<?php

/**
 * web端聊天消息模型
 * @author xiewei <master@xiew.net>
 * @version TS4.0
 */
class CalculationMethodModel
{
    public function __construct()
    {
        $this->user=$_SESSION['mid'];
    }

    /**
     * @param $toUid
     * @return array|bool
     */
    public function getDeterminationStandard($arr,$gender,$birthday)
    {
        $data=$this->_getTestProjectResult($arr['date'],$gender,$birthday,$arr);
        $data1=$this->_getHeightWeightResult($gender,$arr["height"],$arr["weight"]);
        $data=array_merge($data,$data1);
        //1代表优秀 2代表良好 3代表合格 4代表不合格 5代表无法评级
        $result=1;
        $sum=0;
        foreach ($data as $key => $value) {
            if($key!="is_obesity" && $key!="age" && $key!="birthday"){
                $sum+=$value;
               if($value==0){
                    $result=0;
               }
            }
        }
        if($result>0){
            if($sum<=31 && $sum>27){
                $result=2;
            }else if($sum<=27 && $sum>=20){
                $result=3;
            }
            if($sum<20){
                $result=4;
            }
        }
        $data['result']=$result;
        $data['sum']=$sum;
        return $data;
    }
    //通过性别、身高和身体素质数据来判断得分
    private function _getTestProjectResult($date,$gender,$birthday,$arr){
        $user_year= explode("-",$birthday);
        $now_year=explode("-",$date);
        $is_birthday=0;//已过生日
        $no_birthday=0;//已过六个月
        $no_birthday_above=0;//距离六个月
        if((($now_year[1]-$user_year[1])>0) || (($now_year[1]==$user_year[1]) && $now_year[2]>=$user_year[2])){
            $is_birthday=1;
        }
        if($is_birthday==1 && ($now_year[1]-$user_year[1])>=6){
            $no_birthday=1;
        }
        if($is_birthday==0 && ($user_year[1]-$now_year[1])>=6){
            $no_birthday_above=1;   
        }
        $is_age_six=0;//判断3-5还是6岁
        if($now_year[0]-$user_year[0]>=6){
            $is_age_six=1;
        }
        if($is_age_six==0){
            if($is_birthday==1 && $no_birthday==1){
                $age=$now_year[0]-$user_year[0]+0.5;
            }else if($is_birthday==1 && $no_birthday==0){
                $age=$now_year[0]-$user_year[0];
            }else if($is_birthday==0 && $no_birthday_above==0){
                $age=$now_year[0]-$user_year[0]-0.5;
            }else if($is_birthday==0 && $no_birthday_above==1){
                $age=$now_year[0]-$user_year[0]-1;
            }else{
                $age="不对啊";
            }
        }else{
            if($is_birthday==1){
                $age=$now_year[0]-$user_year[0];
            }else{
                $age=$now_year[0]-$user_year[0]-1;
            }
        }
        $data=array(
            'reentry_run'=>0,
            'standing_long_jump'=>0,
            'tennis_throw'=>0,
            'continuousJump'=>0,
            'flexion'=>0,
            'balanceBeam'=>0,
            'height'=>0,
            'age'=>$age,
            'birthday'=>$birthday
        );
        if($age<3.5 && $age>0){
            if($gender==1){
                if($arr["height"]<91.2){
                    $data["height"]=1;
                }
                if($arr["reentry_run"]<=15.8 && $arr["reentry_run"]>=12.9){
                    $data["reentry_run"]=1;
                }
                if($arr["standing_long_jump"]<=29 && $arr["standing_long_jump"]>=21){
                    $data["standing_long_jump"]=1;
                }
                if($arr["tennis_throw"]<=1.9 && $arr["tennis_throw"]>=1.5){
                    $data["tennis_throw"]=1;
                } 
                if($arr["continuousJump"]<=25.0 && $arr["continuousJump"]>=19.7){
                    $data["continuousJump"]=1;
                }
                if($arr["flexion"]<=4.8 && $arr["flexion"]>=2.9){
                    $data["flexion"]=1;
                }
                if($arr["balanceBeam"]<=48.5 && $arr["balanceBeam"]>=30.1){
                    $data["balanceBeam"]=1;
                }
                if($arr["height"]<=95.4 && $arr["height"]>=91.2){
                    $data["height"]=2;
                }
                if($arr["reentry_run"]<=12.8 && $arr["reentry_run"]>=10.3){
                    $data["reentry_run"]=2;
                }
                if($arr["standing_long_jump"]<=42 && $arr["standing_long_jump"]>=30){
                    $data["standing_long_jump"]=2;
                }
                if($arr["tennis_throw"]<=2.9 && $arr["tennis_throw"]>=2.0){
                    $data["tennis_throw"]=2;
                }
                if($arr["continuousJump"]<=19.6 && $arr["continuousJump"]>=13.1){
                    $data["continuousJump"]=2;
                }
                if($arr["flexion"]<=8.5 && $arr["flexion"]>=4.9){
                    $data["flexion"]=2;
                }
                if($arr["balanceBeam"]<=30.0 && $arr["balanceBeam"]>=16.9){
                    $data["balanceBeam"]=2;
                }
                if($arr["height"]<=99.3 && $arr["height"]>=95.5){
                    $data["height"]=3;
                }
                if($arr["reentry_run"]<=10.2 && $arr["reentry_run"]>=9.1){
                    $data["reentry_run"]=3;
                }
                if($arr["standing_long_jump"]<=58 && $arr["standing_long_jump"]>=43){
                    $data["standing_long_jump"]=3;
                }
                if($arr["tennis_throw"]<=3.9 && $arr["tennis_throw"]>=3.0){
                    $data["tennis_throw"]=3;
                }
                if($arr["continuousJump"]<=13.0 && $arr["continuousJump"]>=9.2){
                    $data["continuousJump"]=3;
                }
                if($arr["flexion"]<=11.6 && $arr["flexion"]>=8.6){
                    $data["flexion"]=3;
                }
                if($arr["balanceBeam"]<=16.8 && $arr["balanceBeam"]>=10.6){
                    $data["balanceBeam"]=3;
                }
                if($arr["height"]<=104.1 && $arr["height"]>=99.4){
                    $data["height"]=4;
                }
                if($arr["reentry_run"]<=9.0 && $arr["reentry_run"]>=8.0){
                    $data["reentry_run"]=4;
                }
                if($arr["standing_long_jump"]<=76 && $arr["standing_long_jump"]>=59){
                    $data["standing_long_jump"]=4;
                }
                if($arr["tennis_throw"]<=5.9 && $arr["tennis_throw"]>=4.0){
                    $data["tennis_throw"]=4;
                }
                if($arr["continuousJump"]<=9.1 && $arr["continuousJump"]>=6.6){
                    $data["continuousJump"]=4;
                }
                if($arr["flexion"]<=14.9 && $arr["flexion"]>=11.7){
                    $data["flexion"]=4;
                }
                if($arr["balanceBeam"]<=10.5 && $arr["balanceBeam"]>=6.6){
                    $data["balanceBeam"]=4;
                }
                if($arr["height"]>104.1){
                    $data["height"]=5;
                }
                if($arr["reentry_run"]<8.0 && $arr["reentry_run"]>0){
                    $data["reentry_run"]=5;
                }
                if($arr["standing_long_jump"]>76){
                    $data["standing_long_jump"]=5;
                }
                if($arr["tennis_throw"]>5.5){
                    $data["tennis_throw"]=5;
                }
                if($arr["continuousJump"]<6.6 && $arr["continuousJump"]>0){
                    $data["continuousJump"]=5;
                }
                if($arr["flexion"]>14.9){
                    $data["flexion"]=5;
                }
                if($arr["balanceBeam"]<6.6 && $arr["balanceBeam"]>0){
                    $data["balanceBeam"]=5;
                }
            }else{
                if($arr["height"]<90){
                    $data["height"]=1;
                }
                if($arr["reentry_run"]<=16.8 && $arr["reentry_run"]>=13.5){
                    $data["reentry_run"]=1;
                }
                if($arr["standing_long_jump"]<=28 && $arr["standing_long_jump"]>=21){
                    $data["standing_long_jump"]=1;
                }
                if($arr["tennis_throw"]<=1.4 && $arr["tennis_throw"]>=1.0){
                    $data["tennis_throw"]=1;
                }
                if($arr["continuousJump"]<=25.9 && $arr["continuousJump"]>=20.1){
                    $data["continuousJump"]=1;
                }
                if($arr["flexion"]<=6.2 && $arr["flexion"]>=3.2){
                    $data["flexion"]=1;
                }
                if($arr["balanceBeam"]<=49.8 && $arr["balanceBeam"]>=32.5){
                    $data["balanceBeam"]=1;
                }
                if($arr["height"]<=94.6 && $arr["height"]>=90.0){
                    $data["height"]=2;
                }
                if($arr["reentry_run"]<=13.4 && $arr["reentry_run"]>=10.6){
                    $data["reentry_run"]=2;
                }
                if($arr["standing_long_jump"]<=39 && $arr["standing_long_jump"]>=29){
                    $data["standing_long_jump"]=2;
                }
                if($arr["tennis_throw"]<=2.4 && $arr["tennis_throw"]>=1.5){
                    $data["tennis_throw"]=2;
                }
                if($arr["continuousJump"]<=20.0 && $arr["continuousJump"]>=13.5){
                    $data["continuousJump"]=2;
                }
                if($arr["flexion"]<=9.9 && $arr["flexion"]>=6.3){
                    $data["flexion"]=2;
                }
                if($arr["balanceBeam"]<=32.4 && $arr["balanceBeam"]>=17.4){
                    $data["balanceBeam"]=2;
                }
                if($arr["height"]<=98 && $arr["height"]>=94.7){
                    $data["height"]=3;
                }
                if($arr["reentry_run"]<=10.5 && $arr["reentry_run"]>=9.4){
                    $data["reentry_run"]=3;
                }
                if($arr["standing_long_jump"]<=54 && $arr["standing_long_jump"]>=40){
                    $data["standing_long_jump"]=3;
                }
                if($arr["tennis_throw"]<=3.4 && $arr["tennis_throw"]>=2.5){
                    $data["tennis_throw"]=3;
                }
                if($arr["continuousJump"]<=13.4 && $arr["continuousJump"]>=9.8){
                    $data["continuousJump"]=3;
                }
                if($arr["flexion"]<=12.9 && $arr["flexion"]>=10.0){
                    $data["flexion"]=3;
                }
                if($arr["balanceBeam"]<=17.3 && $arr["balanceBeam"]>=10.8){
                    $data["balanceBeam"]=3;
                }
                if($arr["height"]<=103.0 && $arr["height"]>=98.1){
                    $data["height"]=4;
                }
                if($arr["reentry_run"]<=9.3 && $arr["reentry_run"]>=8.2){
                    $data["reentry_run"]=4;
                }
                if($arr["standing_long_jump"]<=71 && $arr["standing_long_jump"]>=55){
                    $data["standing_long_jump"]=4;
                }
                if($arr["tennis_throw"]<=5.0 && $arr["tennis_throw"]>=3.5){
                    $data["tennis_throw"]=4;
                }
                if($arr["continuousJump"]<=9.7 && $arr["continuousJump"]>=7.1){
                    $data["continuousJump"]=4;
                }
                if($arr["flexion"]<=15.9 && $arr["flexion"]>=13.0){
                    $data["flexion"]=4;
                }
                if($arr["balanceBeam"]<=10.7 && $arr["balanceBeam"]>=6.9){
                    $data["balanceBeam"]=4;
                }
                if($arr["height"]>103.0){
                    $data["height"]=5;
                }
                if($arr["reentry_run"]<8.2  && $arr["reentry_run"]>0){
                    $data["reentry_run"]=5;
                }
                if($arr["standing_long_jump"]>71){
                    $data["standing_long_jump"]=5;
                }
                if($arr["tennis_throw"]>5.0){
                    $data["tennis_throw"]=5;
                }
                if($arr["continuousJump"]<7.1 && $arr["continuousJump"]>0){
                    $data["continuousJump"]=5;
                }
                if($arr["flexion"]>15.9){
                    $data["flexion"]=5;
                }
                if($arr["balanceBeam"]<6.9 && $arr["balanceBeam"]>0){
                    $data["balanceBeam"]=5;
                }
            }
        }
        if($age>=3.5 && $age<4){
            if($gender==1){
                if($arr["height"]<94.1){
                    $data["height"]=1;
                }
                if($arr["reentry_run"]<=14.0 && $arr["reentry_run"]>=11.4){
                    $data["reentry_run"]=1;
                }
                if($arr["standing_long_jump"]<=34 && $arr["standing_long_jump"]>=27){
                    $data["standing_long_jump"]=1;
                }
                if($arr["tennis_throw"]<=1.9 && $arr["tennis_throw"]>=1.5){
                    $data["tennis_throw"]=1;
                }
                if($arr["continuousJump"]<=21.8 && $arr["continuousJump"]>=17.0){
                    $data["continuousJump"]=1;
                }
                if($arr["flexion"]<=4.6 && $arr["flexion"]>=2.7){
                    $data["flexion"]=1;
                }
                if($arr["balanceBeam"]<=41.1 && $arr["balanceBeam"]>=27.1){
                    $data["balanceBeam"]=1;
                }
                if($arr["height"]<=98.2 && $arr["height"]>=94.1){
                    $data["height"]=2;
                }
                if($arr["reentry_run"]<=11.3 && $arr["reentry_run"]>=9.5){
                    $data["reentry_run"]=2;
                }
                if($arr["standing_long_jump"]<=52 && $arr["standing_long_jump"]>=35){
                    $data["standing_long_jump"]=2;
                }
                if($arr["tennis_throw"]<=2.9 && $arr["tennis_throw"]>=2.0){
                    $data["tennis_throw"]=2;
                }
                if($arr["continuousJump"]<=16.9 && $arr["continuousJump"]>=11.2){
                    $data["continuousJump"]=2;
                }
                if($arr["flexion"]<=8.4 && $arr["flexion"]>=4.7){
                    $data["flexion"]=2;
                }
                if($arr["balanceBeam"]<=27.0 && $arr["balanceBeam"]>=15.1){
                    $data["balanceBeam"]=2;
                }
                if($arr["height"]<=102.0 && $arr["height"]>=98.3){
                    $data["height"]=3;
                }
                if($arr["reentry_run"]<=9.4 && $arr["reentry_run"]>=8.4){
                    $data["reentry_run"]=3;
                }
                if($arr["standing_long_jump"]<=69 && $arr["standing_long_jump"]>=53){
                    $data["standing_long_jump"]=3;
                }
                if($arr["tennis_throw"]<=4.4 && $arr["tennis_throw"]>=3.0){
                    $data["tennis_throw"]=3;
                }
                if($arr["continuousJump"]<=11.1 && $arr["continuousJump"]>=8.3){
                    $data["continuousJump"]=3;
                }
                if($arr["flexion"]<=11.5 && $arr["flexion"]>=8.5){
                    $data["flexion"]=3;
                }
                if($arr["balanceBeam"]<=15.0 && $arr["balanceBeam"]>=9.4){
                    $data["balanceBeam"]=3;
                }
                if($arr["height"]<=106.9 && $arr["height"]>=102.1){
                    $data["height"]=4;
                }
                if($arr["reentry_run"]>=7.5 && $arr["reentry_run"]<=8.3){
                    $data["reentry_run"]=4;
                }
                if($arr["standing_long_jump"]<=84 && $arr["standing_long_jump"]>=70){
                    $data["standing_long_jump"]=4;
                }
                if($arr["tennis_throw"]<=5.5 && $arr["tennis_throw"]>=4.5){
                    $data["tennis_throw"]=4;
                }
                if($arr["continuousJump"]<=8.2 && $arr["continuousJump"]>=6.1){
                    $data["continuousJump"]=4;
                }
                if($arr["flexion"]<=14.9 && $arr["flexion"]>=11.6){
                    $data["flexion"]=4;
                }
                if($arr["balanceBeam"]<=9.3 && $arr["balanceBeam"]>=5.9){
                    $data["balanceBeam"]=4;
                }
                if($arr["height"]>106.9){
                    $data["height"]=5;
                }
                if($arr["reentry_run"]<7.5 && $arr["reentry_run"]>0){
                    $data["reentry_run"]=5;
                }
                if($arr["standing_long_jump"]>84){
                    $data["standing_long_jump"]=5;
                }
                if($arr["tennis_throw"]>5.5){
                    $data["tennis_throw"]=5;
                }
                if($arr["continuousJump"]<6.1 && $arr["continuousJump"]>0){
                    $data["continuousJump"]=5;
                }
                if($arr["flexion"]>14.9){
                    $data["flexion"]=5;
                }
                if($arr["balanceBeam"]<5.9 && $arr["balanceBeam"]>0){
                    $data["balanceBeam"]=5;
                }
            }else{
                if($arr["height"]<93.0){
                    $data["height"]=1;
                }
                if($arr["reentry_run"]<=14.9 && $arr["reentry_run"]>=12.1){
                    $data["reentry_run"]=1;
                }
                if($arr["standing_long_jump"]<=33 && $arr["standing_long_jump"]>=25){
                    $data["standing_long_jump"]=1;
                }
                if($arr["tennis_throw"]<=1.9 && $arr["tennis_throw"]>=1.5){
                    $data["tennis_throw"]=1;
                }
                if($arr["continuousJump"]<=21.9 && $arr["continuousJump"]>=17.1){
                    $data["continuousJump"]=1;
                }
                if($arr["flexion"]<=6.2 && $arr["flexion"]>=3.5){
                    $data["flexion"]=1;
                }
                if($arr["balanceBeam"]<=40.4 && $arr["balanceBeam"]>=27.5){
                    $data["balanceBeam"]=1;
                }
                if($arr["height"]<=97.5 && $arr["height"]>=93.0){
                    $data["height"]=2;
                }
                if($arr["reentry_run"]<=12.0 && $arr["reentry_run"]>=9.8){
                    $data["reentry_run"]=2;
                }
                if($arr["standing_long_jump"]<=49 && $arr["standing_long_jump"]>=34){
                    $data["standing_long_jump"]=2;
                }
                if($arr["tennis_throw"]<=2.5 && $arr["tennis_throw"]>=2.0){
                    $data["tennis_throw"]=2;
                }
                if($arr["continuousJump"]<=17.0 && $arr["continuousJump"]>=11.3){
                    $data["continuousJump"]=2;
                }
                if($arr["flexion"]<=9.9 && $arr["flexion"]>=6.3){
                    $data["flexion"]=2;
                }
                if($arr["balanceBeam"]<=27.4 && $arr["balanceBeam"]>=15.1){
                    $data["balanceBeam"]=2;
                }
                if($arr["height"]<=101.1 && $arr["height"]>=97.6){
                    $data["height"]=3;
                }
                if($arr["reentry_run"]<=9.7 && $arr["reentry_run"]>=8.7){
                    $data["reentry_run"]=3;
                }
                if($arr["standing_long_jump"]<=64 && $arr["standing_long_jump"]>=50){
                    $data["standing_long_jump"]=3;
                }
                if($arr["tennis_throw"]<=3.9 && $arr["tennis_throw"]>=3.0){
                    $data["tennis_throw"]=3;
                }
                if($arr["continuousJump"]<=11.2 && $arr["continuousJump"]>=8.5){
                    $data["continuousJump"]=3;
                }
                if($arr["flexion"]<=12.9 && $arr["flexion"]>=10.0){
                    $data["flexion"]=3;
                }
                if($arr["balanceBeam"]<=15.0 && $arr["balanceBeam"]>=9.7){
                    $data["balanceBeam"]=3;
                }
                if($arr["height"]<=105.5 && $arr["height"]>=101.2){
                    $data["height"]=4;
                }
                if($arr["reentry_run"]<=8.6 && $arr["reentry_run"]>=7.7){
                    $data["reentry_run"]=4;
                }
                if($arr["standing_long_jump"]<=81 && $arr["standing_long_jump"]>=65){
                    $data["standing_long_jump"]=4;
                }
                if($arr["tennis_throw"]<=5.0 && $arr["tennis_throw"]>=4.0){
                    $data["tennis_throw"]=4;
                }
                if($arr["continuousJump"]<=8.4 && $arr["continuousJump"]>=6.2){
                    $data["continuousJump"]=4;
                }
                if($arr["flexion"]<=15.9 && $arr["flexion"]>=13.0){
                    $data["flexion"]=4;
                }
                if($arr["balanceBeam"]<=9.6 && $arr["balanceBeam"]>=6.1){
                    $data["balanceBeam"]=4;
                }
                if($arr["height"]>105.5){
                    $data["height"]=5;
                }
                if($arr["reentry_run"]<7.7  && $arr["reentry_run"]>0){
                    $data["reentry_run"]=5;
                }
                if($arr["standing_long_jump"]>81){
                    $data["standing_long_jump"]=5;
                }
                if($arr["tennis_throw"]>5.0){
                    $data["tennis_throw"]=5;
                }
                if($arr["continuousJump"]<6.2  && $arr["continuousJump"]>0){
                    $data["continuousJump"]=5;
                }
                if($arr["flexion"]>15.9){
                    $data["flexion"]=5;
                }
                if($arr["balanceBeam"]<6.1  && $arr["balanceBeam"]>0){
                    $data["balanceBeam"]=5;
                }
            }
        }
        if($age>=4 && $age<4.5){
            if($gender==1){
                if($arr["height"]<97.5){
                    $data["height"]=1;
                }
                if($arr["reentry_run"]<=12.4 && $arr["reentry_run"]>=10.2){
                    $data["reentry_run"]=1;
                }
                if($arr["standing_long_jump"]<=46 && $arr["standing_long_jump"]>=35){
                    $data["standing_long_jump"]=1;
                }
                if($arr["tennis_throw"]<=2.9 && $arr["tennis_throw"]>=2.0){
                    $data["tennis_throw"]=1;
                }
                if($arr["continuousJump"]<=17.0 && $arr["continuousJump"]>=13.2){
                    $data["continuousJump"]=1;
                }
                if($arr["flexion"]<=4.4 && $arr["flexion"]>=2.4){
                    $data["flexion"]=1;
                }
                if($arr["balanceBeam"]<=33.2 && $arr["balanceBeam"]>=21.6){
                    $data["balanceBeam"]=1;
                }
                if($arr["height"]<=101.9 && $arr["height"]>=97.5){
                    $data["height"]=2;
                }
                if($arr["reentry_run"]<=10.1 && $arr["reentry_run"]>=8.6){
                    $data["reentry_run"]=2;
                }
                if($arr["standing_long_jump"]<=64 && $arr["standing_long_jump"]>=47){
                    $data["standing_long_jump"]=2;
                }
                if($arr["tennis_throw"]<=3.9 && $arr["tennis_throw"]>=3.0){
                    $data["tennis_throw"]=2;
                }
                if($arr["continuousJump"]<=13.1 && $arr["continuousJump"]>=9.2){
                    $data["continuousJump"]=2;
                }
                if($arr["flexion"]<=8.4 && $arr["flexion"]>=4.5){
                    $data["flexion"]=2;
                }
                if($arr["balanceBeam"]<=21.5 && $arr["balanceBeam"]>=11.6){
                    $data["balanceBeam"]=2;
                }
                if($arr["height"]<=105.4 && $arr["height"]>=102.0){
                    $data["height"]=3;
                }
                if($arr["reentry_run"]<=8.5 && $arr["reentry_run"]>=7.7){
                    $data["reentry_run"]=3;
                }
                if($arr["standing_long_jump"]<=79 && $arr["standing_long_jump"]>=65){
                    $data["standing_long_jump"]=3;
                }
                if($arr["tennis_throw"]<=4.9 && $arr["tennis_throw"]>=4.0){
                    $data["tennis_throw"]=3;
                }
                if($arr["continuousJump"]<=9.1 && $arr["continuousJump"]>=7.1){
                    $data["continuousJump"]=3;
                }
                if($arr["flexion"]<=11.4 && $arr["flexion"]>=8.5){
                    $data["flexion"]=3;
                }
                if($arr["balanceBeam"]<=11.5 && $arr["balanceBeam"]>=7.4){
                    $data["balanceBeam"]=3;
                }
                if($arr["height"]<=110.4 && $arr["height"]>=105.5){
                    $data["height"]=4;
                }
                if($arr["reentry_run"]<=7.6 && $arr["reentry_run"]>=6.9){
                    $data["reentry_run"]=4;
                }
                if($arr["standing_long_jump"]<=95 && $arr["standing_long_jump"]>=80){
                    $data["standing_long_jump"]=4;
                }
                if($arr["tennis_throw"]<=6.0 && $arr["tennis_throw"]>=5.0){
                    $data["tennis_throw"]=4;
                }
                if($arr["continuousJump"]<=7.0 && $arr["continuousJump"]>=5.6){
                    $data["continuousJump"]=4;
                }
                if($arr["flexion"]<=14.9 && $arr["flexion"]>=11.5){
                    $data["flexion"]=4;
                }
                if($arr["balanceBeam"]<=7.3 && $arr["balanceBeam"]>=4.9){
                    $data["balanceBeam"]=4;
                }
                if($arr["height"]>110.4){
                    $data["height"]=5;
                }
                if($arr["reentry_run"]<6.9  && $arr["reentry_run"]>0){
                    $data["reentry_run"]=5;
                }
                if($arr["standing_long_jump"]>95){
                    $data["standing_long_jump"]=5;
                }
                if($arr["tennis_throw"]>6.0){
                    $data["tennis_throw"]=5;
                }
                if($arr["continuousJump"]<5.6 && $arr["continuousJump"]>0){
                    $data["continuousJump"]=5;
                }
                if($arr["flexion"]>14.9){
                    $data["flexion"]=5;
                }
                if($arr["balanceBeam"]<4.9 && $arr["balanceBeam"]>0){
                    $data["balanceBeam"]=5;
                }
            }else{
                if($arr["height"]<96.6){
                    $data["height"]=1;
                }
                if($arr["reentry_run"]<=13.2 && $arr["reentry_run"]>=10.9){
                    $data["reentry_run"]=1;
                }
                if($arr["standing_long_jump"]<=43 && $arr["standing_long_jump"]>=32){
                    $data["standing_long_jump"]=1;
                }
                if($arr["tennis_throw"]<=2.4 && $arr["tennis_throw"]>=2.0){
                    $data["tennis_throw"]=1;
                }
                if($arr["continuousJump"]<=17.2 && $arr["continuousJump"]>=13.5){
                    $data["continuousJump"]=1;
                }
                if($arr["flexion"]<=5.9 && $arr["flexion"]>=3.4){
                    $data["flexion"]=1;
                }
                if($arr["balanceBeam"]<=32.2 && $arr["balanceBeam"]>=22.6){
                    $data["balanceBeam"]=1;
                }
                if($arr["height"]<=100.9 && $arr["height"]>=96.6){
                    $data["height"]=2;
                }
                if($arr["reentry_run"]<=10.8 && $arr["reentry_run"]>=9.1){
                    $data["reentry_run"]=2;
                }
                if($arr["standing_long_jump"]<=59 && $arr["standing_long_jump"]>=44){
                    $data["standing_long_jump"]=2;
                }
                if($arr["tennis_throw"]<=3.4 && $arr["tennis_throw"]>=2.5){
                    $data["tennis_throw"]=2;
                }
                if($arr["continuousJump"]<=13.4 && $arr["continuousJump"]>=9.6){
                    $data["continuousJump"]=2;
                }
                if($arr["flexion"]<=9.9 && $arr["flexion"]>=6.0){
                    $data["flexion"]=2;
                }
                if($arr["balanceBeam"]<=22.5 && $arr["balanceBeam"]>=12.3){
                    $data["balanceBeam"]=2;
                }
                if($arr["height"]<=104.4 && $arr["height"]>=101.0){
                    $data["height"]=3;
                }
                if($arr["reentry_run"]<=9.0 && $arr["reentry_run"]>=8.1){
                    $data["reentry_run"]=3;
                }
                if($arr["standing_long_jump"]<=73 && $arr["standing_long_jump"]>=60){
                    $data["standing_long_jump"]=3;
                }
                if($arr["tennis_throw"]<=4.4 && $arr["tennis_throw"]>=3.5){
                    $data["tennis_throw"]=3;
                }
                if($arr["continuousJump"]<=9.5 && $arr["continuousJump"]>=7.4){
                    $data["continuousJump"]=3;
                }
                if($arr["flexion"]<=12.9 && $arr["flexion"]>=10.0){
                    $data["flexion"]=3;
                }
                if($arr["balanceBeam"]<=12.2 && $arr["balanceBeam"]>=8.2){
                    $data["balanceBeam"]=3;
                }
                if($arr["height"]<=108.9 && $arr["height"]>=104.5){
                    $data["height"]=4;
                }
                if($arr["reentry_run"]<=8.0 && $arr["reentry_run"]>=7.2){
                    $data["reentry_run"]=4;
                }
                if($arr["standing_long_jump"]<=89 && $arr["standing_long_jump"]>=74){
                    $data["standing_long_jump"]=4;
                }
                if($arr["tennis_throw"]<=5.0 && $arr["tennis_throw"]>=4.5){
                    $data["tennis_throw"]=4;
                }
                if($arr["continuousJump"]<=7.3 && $arr["continuousJump"]>=5.9){
                    $data["continuousJump"]=4;
                }
                if($arr["flexion"]<=15.9 && $arr["flexion"]>=13.0){
                    $data["flexion"]=4;
                }
                if($arr["balanceBeam"]<=8.1 && $arr["balanceBeam"]>=5.3){
                    $data["balanceBeam"]=4;
                }
                if($arr["height"]>108.9){
                    $data["height"]=5;
                }
                if($arr["reentry_run"]<7.2 && $arr["reentry_run"]>0){
                    $data["reentry_run"]=5;
                }
                if($arr["standing_long_jump"]>89){
                    $data["standing_long_jump"]=5;
                }
                if($arr["tennis_throw"]>5.0){
                    $data["tennis_throw"]=5;
                }
                if($arr["continuousJump"]<5.9 && $arr["continuousJump"]>0){
                    $data["continuousJump"]=5;
                }
                if($arr["flexion"]>15.9){
                    $data["flexion"]=5;
                }
                if($arr["balanceBeam"]<5.3 && $arr["balanceBeam"]>0){
                    $data["balanceBeam"]=5;
                }
            }
        }
        if($age>=4.5 && $age<5){
            if($gender==1){
                if($arr["height"]<100.0){
                    $data["height"]=1;
                }
                if($arr["reentry_run"]<=11.8 && $arr["reentry_run"]>=9.8){
                    $data["reentry_run"]=1;
                }
                if($arr["standing_long_jump"]<=54 && $arr["standing_long_jump"]>=40){
                    $data["standing_long_jump"]=1;
                }
                if($arr["tennis_throw"]<=2.9 && $arr["tennis_throw"]>=2.5){
                    $data["tennis_throw"]=1;
                }
                if($arr["continuousJump"]<=14.5 && $arr["continuousJump"]>=11.3){
                    $data["continuousJump"]=1;
                }
                if($arr["flexion"]<=4.1 && $arr["flexion"]>=1.8){
                    $data["flexion"]=1;
                }
                if($arr["balanceBeam"]<=28.4 && $arr["balanceBeam"]>=17.9){
                    $data["balanceBeam"]=1;
                }
                if($arr["height"]<=104.6 && $arr["height"]>=100){
                    $data["height"]=2;
                }
                if($arr["reentry_run"]<=9.7 && $arr["reentry_run"]>=8.1){
                    $data["reentry_run"]=2;
                }
                if($arr["standing_long_jump"]<=72 && $arr["standing_long_jump"]>=55){
                    $data["standing_long_jump"]=2;
                }
                if($arr["tennis_throw"]<=4.4 && $arr["tennis_throw"]>=3.0){
                    $data["tennis_throw"]=2;
                }
                if($arr["continuousJump"]<=11.2 && $arr["continuousJump"]>=8.2){
                    $data["continuousJump"]=2;
                }
                if($arr["flexion"]<=7.9 && $arr["flexion"]>=4.2){
                    $data["flexion"]=2;
                }
                if($arr["balanceBeam"]<=17.8 && $arr["balanceBeam"]>=9.7){
                    $data["balanceBeam"]=2;
                }
                if($arr["height"]<=108.4 && $arr["height"]>=104.7){
                    $data["height"]=3;
                }
                if($arr["reentry_run"]<=8.0 && $arr["reentry_run"]>=7.3){
                    $data["reentry_run"]=3;
                }
                if($arr["standing_long_jump"]<=88 && $arr["standing_long_jump"]>=73){
                    $data["standing_long_jump"]=3;
                }
                if($arr["tennis_throw"]<=6.4 && $arr["tennis_throw"]>=4.5){
                    $data["tennis_throw"]=3;
                }
                if($arr["continuousJump"]<=8.1 && $arr["continuousJump"]>=6.5){
                    $data["continuousJump"]=3;
                }
                if($arr["flexion"]<=10.9 && $arr["flexion"]>=8.0){
                    $data["flexion"]=3;
                }
                if($arr["balanceBeam"]<=9.6 && $arr["balanceBeam"]>=6.3){
                    $data["balanceBeam"]=3;
                }
                if($arr["height"]<=113.1 && $arr["height"]>=108.5){
                    $data["height"]=4;
                }
                if($arr["reentry_run"]<=7.2 && $arr["reentry_run"]>=6.7){
                    $data["reentry_run"]=4;
                }
                if($arr["standing_long_jump"]<=102 && $arr["standing_long_jump"]>=89){
                    $data["standing_long_jump"]=4;
                }
                if($arr["tennis_throw"]<=8.0 && $arr["tennis_throw"]>=6.5){
                    $data["tennis_throw"]=4;
                }
                if($arr["continuousJump"]<=6.4 && $arr["continuousJump"]>=5.3){
                    $data["continuousJump"]=4;
                }
                if($arr["flexion"]<=14.4 && $arr["flexion"]>=11.0){
                    $data["flexion"]=4;
                }
                if($arr["balanceBeam"]<=6.2 && $arr["balanceBeam"]>=4.3){
                    $data["balanceBeam"]=4;
                }
                if($arr["height"]>113.1){
                    $data["height"]=5;
                }
                if($arr["reentry_run"]<6.7  && $arr["reentry_run"]>0){
                    $data["reentry_run"]=5;
                }
                if($arr["standing_long_jump"]>102){
                    $data["standing_long_jump"]=5;
                }
                if($arr["tennis_throw"]>8.0){
                    $data["tennis_throw"]=5;
                }
                if($arr["continuousJump"]<5.3 && $arr["continuousJump"]>0){
                    $data["continuousJump"]=5;
                }
                if($arr["flexion"]>14.4){
                    $data["flexion"]=5;
                }
                if($arr["balanceBeam"]<4.3 && $arr["balanceBeam"]>0){
                    $data["balanceBeam"]=5;
                }
            }else{
                if($arr["height"]<99.0){
                    $data["height"]=1;
                }
                if($arr["reentry_run"]<=12.4 && $arr["reentry_run"]>=10.3){
                    $data["reentry_run"]=1;
                }
                if($arr["standing_long_jump"]<=49 && $arr["standing_long_jump"]>=40){
                    $data["standing_long_jump"]=1;
                }
                if($arr["tennis_throw"]<=2.4 && $arr["tennis_throw"]>=2.0){
                    $data["tennis_throw"]=1;
                }
                if($arr["continuousJump"]<=14.9 && $arr["continuousJump"]>=12.0){
                    $data["continuousJump"]=1;
                }
                if($arr["flexion"]<=5.9 && $arr["flexion"]>=3.0){
                    $data["flexion"]=1;
                }
                if($arr["balanceBeam"]<=26.5 && $arr["balanceBeam"]>=18.7){
                    $data["balanceBeam"]=1;
                }
                if($arr["height"]<=103.6 && $arr["height"]>=99.0){
                    $data["height"]=2;
                }
                if($arr["reentry_run"]<=10.2 && $arr["reentry_run"]>=8.6){
                    $data["reentry_run"]=2;
                }
                if($arr["standing_long_jump"]<=67 && $arr["standing_long_jump"]>=50){
                    $data["standing_long_jump"]=2;
                }
                if($arr["tennis_throw"]<=3.4 && $arr["tennis_throw"]>=2.5){
                    $data["tennis_throw"]=2;
                }
                if($arr["continuousJump"]<=11.9 && $arr["continuousJump"]>=8.6){
                    $data["continuousJump"]=2;
                }
                if($arr["flexion"]<=9.9 && $arr["flexion"]>=6.0){
                    $data["flexion"]=2;
                }
                if($arr["balanceBeam"]<=18.6 && $arr["balanceBeam"]>=10.2){
                    $data["balanceBeam"]=2;
                }
                if($arr["height"]<=107.3 && $arr["height"]>=103.7){
                    $data["height"]=3;
                }
                if($arr["reentry_run"]<=8.5 && $arr["reentry_run"]>=7.7){
                    $data["reentry_run"]=3;
                }
                if($arr["standing_long_jump"]<=80 && $arr["standing_long_jump"]>=68){
                    $data["standing_long_jump"]=3;
                }
                if($arr["tennis_throw"]<=4.4 && $arr["tennis_throw"]>=3.5){
                    $data["tennis_throw"]=3;
                }
                if($arr["continuousJump"]<=8.5 && $arr["continuousJump"]>=6.8){
                    $data["continuousJump"]=3;
                }
                if($arr["flexion"]<=12.9 && $arr["flexion"]>=10.0){
                    $data["flexion"]=3;
                }
                if($arr["balanceBeam"]<=10.1 && $arr["balanceBeam"]>=7.0){
                    $data["balanceBeam"]=3;
                }
                if($arr["height"]<=111.9 && $arr["height"]>=107.4){
                    $data["height"]=4;
                }
                if($arr["reentry_run"]<=7.6 && $arr["reentry_run"]>=7.0){
                    $data["reentry_run"]=4;
                }
                if($arr["standing_long_jump"]<=96 && $arr["standing_long_jump"]>=81){
                    $data["standing_long_jump"]=4;
                }
                if($arr["tennis_throw"]<=5.5 && $arr["tennis_throw"]>=4.5){
                    $data["tennis_throw"]=4;
                }
                if($arr["continuousJump"]<=6.7 && $arr["continuousJump"]>=5.5){
                    $data["continuousJump"]=4;
                }
                if($arr["flexion"]<=16.0 && $arr["flexion"]>=13.0){
                    $data["flexion"]=4;
                }
                if($arr["balanceBeam"]<=6.9 && $arr["balanceBeam"]>=4.7){
                    $data["balanceBeam"]=4;
                }
                if($arr["height"]>111.9){
                    $data["height"]=5;
                }
                if($arr["reentry_run"]<7.0 && $arr["reentry_run"]>0){
                    $data["reentry_run"]=5;
                }
                if($arr["standing_long_jump"]>96){
                    $data["standing_long_jump"]=5;
                }
                if($arr["tennis_throw"]>5.5){
                    $data["tennis_throw"]=5;
                }
                if($arr["continuousJump"]<5.5 && $arr["continuousJump"]>0){
                    $data["continuousJump"]=5;
                }
                if($arr["flexion"]>16.0){
                    $data["flexion"]=5;
                }
                if($arr["balanceBeam"]<4.7 && $arr["balanceBeam"]>0){
                    $data["balanceBeam"]=5;
                }
            }
        }
        if($age>=5 && $age<=5.5){
            if($gender==1){
                if($arr["height"]<103.1){
                    $data["height"]=1;
                }
                if($arr["reentry_run"]<=10.3 && $arr["reentry_run"]>=9.0){
                    $data["reentry_run"]=1;
                }
                if($arr["standing_long_jump"]<=64 && $arr["standing_long_jump"]>=50){
                    $data["standing_long_jump"]=1;
                }
                if($arr["tennis_throw"]<=3.9  && $arr["tennis_throw"]>=3.0){
                    $data["tennis_throw"]=1;
                }
                if($arr["continuousJump"]<=12.5 && $arr["continuousJump"]>=9.9){
                    $data["continuousJump"]=1;
                }
                if($arr["flexion"]<=3.4 && $arr["flexion"]>=1.1){
                    $data["flexion"]=1;
                }
                if($arr["balanceBeam"]<=22.2 && $arr["balanceBeam"]>=14.1){
                    $data["balanceBeam"]=1;
                }
                if($arr["height"]<=107.8 && $arr["height"]>=103.1){
                    $data["height"]=2;
                }
                if($arr["reentry_run"]<=8.9 && $arr["reentry_run"]>=7.7){
                    $data["reentry_run"]=2;
                }
                if($arr["standing_long_jump"]<=79 && $arr["standing_long_jump"]>=65){
                    $data["standing_long_jump"]=2;
                }
                if($arr["tennis_throw"]<=5.4 && $arr["tennis_throw"]>=4.0){
                    $data["tennis_throw"]=2;
                }
                if($arr["continuousJump"]<=9.8 && $arr["continuousJump"]>=7.3){
                    $data["continuousJump"]=2;
                }
                if($arr["flexion"]<=7.5 && $arr["flexion"]>=3.5){
                    $data["flexion"]=2;
                }
                if($arr["balanceBeam"]<=14.0 && $arr["balanceBeam"]>=7.9){
                    $data["balanceBeam"]=2;
                }
                if($arr["height"]<=111.9 && $arr["height"]>=107.9){
                    $data["height"]=3;
                }
                if($arr["reentry_run"]<=7.6 && $arr["reentry_run"]>=7.0){
                    $data["reentry_run"]=3;
                }
                if($arr["standing_long_jump"]<=95 && $arr["standing_long_jump"]>=80){
                    $data["standing_long_jump"]=3;
                }
                if($arr["tennis_throw"]<=7.4 && $arr["tennis_throw"]>=5.5){
                    $data["tennis_throw"]=3;
                }
                if($arr["continuousJump"]<=7.2 && $arr["continuousJump"]>=6.0){
                    $data["continuousJump"]=3;
                }
                if($arr["flexion"]<=10.9 && $arr["flexion"]>=7.6){
                    $data["flexion"]=3;
                }
                if($arr["balanceBeam"]<=7.8 && $arr["balanceBeam"]>=5.3){
                    $data["balanceBeam"]=3;
                }
                if($arr["height"]<=116.9 && $arr["height"]>=112.0){
                    $data["height"]=4;
                }
                if($arr["reentry_run"]<=6.9 && $arr["reentry_run"]>=6.4){
                    $data["reentry_run"]=4;
                }
                if($arr["standing_long_jump"]<=110 && $arr["standing_long_jump"]>=96){
                    $data["standing_long_jump"]=4;
                }
                if($arr["tennis_throw"]<=9.0 && $arr["tennis_throw"]>=7.5){
                    $data["tennis_throw"]=4;
                }
                if($arr["continuousJump"]<=5.9 && $arr["continuousJump"]>=5.1){
                    $data["continuousJump"]=4;
                }
                if($arr["flexion"]<=14.4 && $arr["flexion"]>=11.0){
                    $data["flexion"]=4;
                }
                if($arr["balanceBeam"]<=5.2 && $arr["balanceBeam"]>=3.7){
                    $data["balanceBeam"]=4;
                }
                if($arr["height"]>116.9){
                    $data["height"]=5;
                }
                if($arr["reentry_run"]<6.4 && $arr["reentry_run"]>0){
                    $data["reentry_run"]=5;
                }
                if($arr["standing_long_jump"]>110){
                    $data["standing_long_jump"]=5;
                }
                if($arr["tennis_throw"]>9.0){
                    $data["tennis_throw"]=5;
                }
                if($arr["continuousJump"]<5.1 && $arr["continuousJump"]>0){
                    $data["continuousJump"]=5;
                }
                if($arr["flexion"]>14.4){
                    $data["flexion"]=5;
                }
                if($arr["balanceBeam"]<3.7 && $arr["balanceBeam"]>0){
                    $data["balanceBeam"]=5;
                }
            }else{
                if($arr["height"]<102.0){
                    $data["height"]=1;
                }
                if($arr["reentry_run"]<=11.2 && $arr["reentry_run"]>=9.7){
                    $data["reentry_run"]=1;
                }
                if($arr["standing_long_jump"]<=59 && $arr["standing_long_jump"]>=50){
                    $data["standing_long_jump"]=1;
                }
                if($arr["tennis_throw"]<=3.4 && $arr["tennis_throw"]>=2.5){
                    $data["tennis_throw"]=1;
                }
                if($arr["continuousJump"]<=12.7 && $arr["continuousJump"]>=10.1){
                    $data["continuousJump"]=1;
                }
                if($arr["flexion"]<=5.4 && $arr["flexion"]>=3.0){
                    $data["flexion"]=1;
                }
                if($arr["balanceBeam"]<=23.7 && $arr["balanceBeam"]>=14.1){
                    $data["balanceBeam"]=1;
                }
                if($arr["height"]<=106.5 && $arr["height"]>=102.0){
                    $data["height"]=2;
                }
                if($arr["reentry_run"]<=9.6 && $arr["reentry_run"]>=8.1){
                    $data["reentry_run"]=2;
                }
                if($arr["standing_long_jump"]<=74 && $arr["standing_long_jump"]>=60){
                    $data["standing_long_jump"]=2;
                }
                if($arr["tennis_throw"]<=4.4 && $arr["tennis_throw"]>=3.5){
                    $data["tennis_throw"]=2;
                }
                if($arr["continuousJump"]<=10.0 && $arr["continuousJump"]>=7.6){
                    $data["continuousJump"]=2;
                }
                if($arr["flexion"]<=9.6 && $arr["flexion"]>=5.5){
                    $data["flexion"]=2;
                }
                if($arr["balanceBeam"]<=14.0 && $arr["balanceBeam"]>=8.3){
                    $data["balanceBeam"]=2;
                }
                if($arr["height"]<=110.4 && $arr["height"]>=106.6){
                    $data["height"]=3;
                }
                if($arr["reentry_run"]<=8.0 && $arr["reentry_run"]>=7.3){
                    $data["reentry_run"]=3;
                }
                if($arr["standing_long_jump"]<=88 && $arr["standing_long_jump"]>=75){
                    $data["standing_long_jump"]=3;
                }
                if($arr["tennis_throw"]<=5.9 && $arr["tennis_throw"]>=4.5){
                    $data["tennis_throw"]=3;
                }
                if($arr["continuousJump"]<=7.5 && $arr["continuousJump"]>=6.2){
                    $data["continuousJump"]=3;
                }
                if($arr["flexion"]<=13.1 && $arr["flexion"]>=9.7){
                    $data["flexion"]=3;
                }
                if($arr["balanceBeam"]<=8.2 && $arr["balanceBeam"]>=5.8){
                    $data["balanceBeam"]=3;
                }
                if($arr["height"]<=115.4 && $arr["height"]>=110.5){
                    $data["height"]=4;
                }
                if($arr["reentry_run"]<=7.2 && $arr["reentry_run"]>=6.7){
                    $data["reentry_run"]=4;
                }
                if($arr["standing_long_jump"]<=102 && $arr["standing_long_jump"]>=89){
                    $data["standing_long_jump"]=4;
                }
                if($arr["tennis_throw"]<=8.5 && $arr["tennis_throw"]>=6.0){
                    $data["tennis_throw"]=4;
                }
                if($arr["continuousJump"]<=6.1 && $arr["continuousJump"]>=5.2){
                    $data["continuousJump"]=4;
                }
                if($arr["flexion"]<=16.6 && $arr["flexion"]>=13.2){
                    $data["flexion"]=4;
                }
                if($arr["balanceBeam"]<=5.7 && $arr["balanceBeam"]>=4.1){
                    $data["balanceBeam"]=4;
                }
                if($arr["height"]>115.4){
                    $data["height"]=5;
                }
                if($arr["reentry_run"]<6.7 && $arr["reentry_run"]>0){
                    $data["reentry_run"]=5;
                }
                if($arr["standing_long_jump"]>102){
                    $data["standing_long_jump"]=5;
                }
                if($arr["tennis_throw"]>8.5){
                    $data["tennis_throw"]=5;
                }
                if($arr["continuousJump"]<5.2 && $arr["continuousJump"]>0){
                    $data["continuousJump"]=5;
                }
                if($arr["flexion"]>16.6){
                    $data["flexion"]=5;
                }
                if($arr["balanceBeam"]<4.1 && $arr["balanceBeam"]>0){
                    $data["balanceBeam"]=5;
                }
            }
        }
        if($age>=5.5 && $age<6){
            if($gender==1){
                if($arr["height"]<=104.6){
                    $data["height"]=1;
                }
                if($arr["reentry_run"]<=10.0 && $arr["reentry_run"]>=8.6){
                    $data["reentry_run"]=1;
                }
                if($arr["standing_long_jump"]<=69 && $arr["standing_long_jump"]>=56){
                    $data["standing_long_jump"]=1;
                }
                if($arr["tennis_throw"]<=3.9  && $arr["tennis_throw"]>=3.0){
                    $data["tennis_throw"]=1;
                }
                if($arr["continuousJump"]<=11.9 && $arr["continuousJump"]>=9.4){
                    $data["continuousJump"]=1;
                }
                if($arr["flexion"]<=3.2 && $arr["flexion"]>=1.0){
                    $data["flexion"]=1;
                }
                if($arr["balanceBeam"]<=19.2 && $arr["balanceBeam"]>=12.1){
                    $data["balanceBeam"]=1;
                }
                if($arr["height"]<=104.6 && $arr["height"]>=110.1){
                    $data["height"]=2;
                }
                if($arr["reentry_run"]<=8.5 && $arr["reentry_run"]>=7.4){
                    $data["reentry_run"]=2;
                }
                if($arr["standing_long_jump"]<=89 && $arr["standing_long_jump"]>=70){
                    $data["standing_long_jump"]=2;
                }
                if($arr["tennis_throw"]<=5.9 && $arr["tennis_throw"]>=4.0){
                    $data["tennis_throw"]=2;
                }
                if($arr["continuousJump"]<=9.3 && $arr["continuousJump"]>=6.9){
                    $data["continuousJump"]=2;
                }
                if($arr["flexion"]<=7.5 && $arr["flexion"]>=3.3){
                    $data["flexion"]=2;
                }
                if($arr["balanceBeam"]<=12.0 && $arr["balanceBeam"]>=6.8){
                    $data["balanceBeam"]=2;
                }
                if($arr["height"]<=114.6 && $arr["height"]>=110.2){
                    $data["height"]=3;
                }
                if($arr["reentry_run"]<=7.3 && $arr["reentry_run"]>=6.8){
                    $data["reentry_run"]=3;
                }
                if($arr["standing_long_jump"]<=102 && $arr["standing_long_jump"]>=90){
                    $data["standing_long_jump"]=3;
                }
                if($arr["tennis_throw"]<=7.5 && $arr["tennis_throw"]>=6.0){
                    $data["tennis_throw"]=3;
                }
                if($arr["continuousJump"]<=6.8 && $arr["continuousJump"]>=5.7){
                    $data["continuousJump"]=3;
                }
                if($arr["flexion"]<=10.9 && $arr["flexion"]>=7.6){
                    $data["flexion"]=3;
                }
                if($arr["balanceBeam"]<=6.7 && $arr["balanceBeam"]>=4.6){
                    $data["balanceBeam"]=3;
                }
                if($arr["height"]<=119.7 && $arr["height"]>=114.7){
                    $data["height"]=4;
                }
                if($arr["reentry_run"]<=6.7 && $arr["reentry_run"]>=6.2){
                    $data["reentry_run"]=4;
                }
                if($arr["standing_long_jump"]<=119 && $arr["standing_long_jump"]>=103){
                    $data["standing_long_jump"]=4;
                }
                if($arr["tennis_throw"]<=10.0 && $arr["tennis_throw"]>=8.0){
                    $data["tennis_throw"]=4;
                }
                if($arr["continuousJump"]<=5.6 && $arr["continuousJump"]>=4.9){
                    $data["continuousJump"]=4;
                }
                if($arr["flexion"]<=14.4 && $arr["flexion"]>=11.0){
                    $data["flexion"]=4;
                }
                if($arr["balanceBeam"]<=4.5 && $arr["balanceBeam"]>=3.3){
                    $data["balanceBeam"]=4;
                }
                if($arr["height"]>119.7){
                    $data["height"]=5;
                }
                if($arr["reentry_run"]<6.2 && $arr["reentry_run"]>0){
                    $data["reentry_run"]=5;
                }
                if($arr["standing_long_jump"]>119){
                    $data["standing_long_jump"]=5;
                }
                if($arr["tennis_throw"]>10.0){
                    $data["tennis_throw"]=5;
                }
                if($arr["continuousJump"]<4.9 && $arr["continuousJump"]>0){
                    $data["continuousJump"]=5;
                }
                if($arr["flexion"]>14.4){
                    $data["flexion"]=5;
                }
                if($arr["balanceBeam"]<3.3 && $arr["balanceBeam"]>0){
                    $data["balanceBeam"]=5;
                }
            }else{
                if($arr["height"]<104.5){
                    $data["height"]=1;
                }
                if($arr["reentry_run"]<=10.5 && $arr["reentry_run"]>=9.1){
                    $data["reentry_run"]=1;
                }
                if($arr["standing_long_jump"]<=65 && $arr["standing_long_jump"]>=54){
                    $data["standing_long_jump"]=1;
                }
                if($arr["tennis_throw"]<=3.4 && $arr["tennis_throw"]>=3.0){
                    $data["tennis_throw"]=1;
                }
                if($arr["continuousJump"]<=11.5 && $arr["continuousJump"]>=9.3){
                    $data["continuousJump"]=1;
                }
                if($arr["flexion"]<=5.4 && $arr["flexion"]>=3.0){
                    $data["flexion"]=1;
                }
                if($arr["balanceBeam"]<=20.1 && $arr["balanceBeam"]>=12.6){
                    $data["balanceBeam"]=1;
                }
                if($arr["height"]<=109.2 && $arr["height"]>=104.5){
                    $data["height"]=2;
                }
                if($arr["reentry_run"]<=9.0 && $arr["reentry_run"]>=7.7){
                    $data["reentry_run"]=2;
                }
                if($arr["standing_long_jump"]<=81 && $arr["standing_long_jump"]>=66){
                    $data["standing_long_jump"]=2;
                }
                if($arr["tennis_throw"]<=4.9 && $arr["tennis_throw"]>=3.5){
                    $data["tennis_throw"]=2;
                }
                if($arr["continuousJump"]<=9.2 && $arr["continuousJump"]>=7.0){
                    $data["continuousJump"]=2;
                }
                if($arr["flexion"]<=9.6 && $arr["flexion"]>=5.5){
                    $data["flexion"]=2;
                }
                if($arr["balanceBeam"]<=12.5 && $arr["balanceBeam"]>=7.5){
                    $data["balanceBeam"]=2;
                }
                if($arr["height"]<=113.4 && $arr["height"]>=109.3){
                    $data["height"]=3;
                }
                if($arr["reentry_run"]<=7.6 && $arr["reentry_run"]>=7.0){
                    $data["reentry_run"]=3;
                }
                if($arr["standing_long_jump"]<=95 && $arr["standing_long_jump"]>=82){
                    $data["standing_long_jump"]=3;
                }
                if($arr["tennis_throw"]<=6.0 && $arr["tennis_throw"]>=5.0){
                    $data["tennis_throw"]=3;
                }
                if($arr["continuousJump"]<=6.9 && $arr["continuousJump"]>=5.8){
                    $data["continuousJump"]=3;
                }
                if($arr["flexion"]<=12.9 && $arr["flexion"]>=9.7){
                    $data["flexion"]=3;
                }
                if($arr["balanceBeam"]<=7.4 && $arr["balanceBeam"]>=5.1){
                    $data["balanceBeam"]=3;
                }
                if($arr["height"]<=118.4 && $arr["height"]>=113.5){
                    $data["height"]=4;
                }
                if($arr["reentry_run"]<=6.9 && $arr["reentry_run"]>=6.4){
                    $data["reentry_run"]=4;
                }
                if($arr["standing_long_jump"]<=109 && $arr["standing_long_jump"]>=96){
                    $data["standing_long_jump"]=4;
                }
                if($arr["tennis_throw"]<=8.5 && $arr["tennis_throw"]>=6.5){
                    $data["tennis_throw"]=4;
                }
                if($arr["continuousJump"]<=5.7 && $arr["continuousJump"]>=4.9){
                    $data["continuousJump"]=4;
                }
                if($arr["flexion"]<=16.7 && $arr["flexion"]>=13.0){
                    $data["flexion"]=4;
                }
                if($arr["balanceBeam"]<=5.0 && $arr["balanceBeam"]>=3.6){
                    $data["balanceBeam"]=4;
                }
                if($arr["height"]>118.4){
                    $data["height"]=5;
                }
                if($arr["reentry_run"]<6.4 && $arr["reentry_run"]>0){
                    $data["reentry_run"]=5;
                }
                if($arr["standing_long_jump"]>109){
                    $data["standing_long_jump"]=5;
                }
                if($arr["tennis_throw"]>8.5){
                    $data["tennis_throw"]=5;
                }
                if($arr["continuousJump"]<4.9 && $arr["continuousJump"]>0){
                    $data["continuousJump"]=5;
                }
                if($arr["flexion"]>16.7){
                    $data["flexion"]=5;
                }
                if($arr["balanceBeam"]<3.6 && $arr["balanceBeam"]>0){
                    $data["balanceBeam"]=5;
                }
            }
        }
        if($age>=6){
            if($gender==1){
                if($arr["height"]<108.2){
                    $data["height"]=1;
                }
                if($arr["reentry_run"]<=9.4 && $arr["reentry_run"]>=8.0){
                    $data["reentry_run"]=1;
                }
                if($arr["standing_long_jump"]<=78 && $arr["standing_long_jump"]>=61){
                    $data["standing_long_jump"]=1;
                }
                if($arr["tennis_throw"]<=4.4  && $arr["tennis_throw"]>=3.5){
                    $data["tennis_throw"]=1;
                }
                if($arr["continuousJump"]<=10.4 && $arr["continuousJump"]>=8.3){
                    $data["continuousJump"]=1;
                }
                if($arr["flexion"]<=3.1 && $arr["flexion"]>=1.0){
                    $data["flexion"]=1;
                }
                if($arr["balanceBeam"]<=16.0 && $arr["balanceBeam"]>=9.4){
                    $data["balanceBeam"]=1;
                }
                if($arr["height"]<=113.2 && $arr["height"]>=108.2){
                    $data["height"]=2;
                }
                if($arr["reentry_run"]<=7.9 && $arr["reentry_run"]>=6.9){
                    $data["reentry_run"]=2;
                }
                if($arr["standing_long_jump"]<=94 && $arr["standing_long_jump"]>=79){
                    $data["standing_long_jump"]=2;
                }
                if($arr["tennis_throw"]<=6.9 && $arr["tennis_throw"]>=4.5){
                    $data["tennis_throw"]=2;
                }
                if($arr["continuousJump"]<=8.2 && $arr["continuousJump"]>=6.2){
                    $data["continuousJump"]=2;
                }
                if($arr["flexion"]<=7.0 && $arr["flexion"]>=3.2){
                    $data["flexion"]=2;
                }
                if($arr["balanceBeam"]<=9.3 && $arr["balanceBeam"]>=5.4){
                    $data["balanceBeam"]=2;
                }
                if($arr["height"]<=117.7 && $arr["height"]>=113.3){
                    $data["height"]=3;
                }
                if($arr["reentry_run"]<=6.8 && $arr["reentry_run"]>=6.3){
                    $data["reentry_run"]=3;
                }
                if($arr["standing_long_jump"]<=110 && $arr["standing_long_jump"]>=95){
                    $data["standing_long_jump"]=3;
                }
                if($arr["tennis_throw"]<=9.4 && $arr["tennis_throw"]>=7.0){
                    $data["tennis_throw"]=3;
                }
                if($arr["continuousJump"]<=6.1 && $arr["continuousJump"]>=5.2){
                    $data["continuousJump"]=3;
                }
                if($arr["flexion"]<=10.4 && $arr["flexion"]>=7.1){
                    $data["flexion"]=3;
                }
                if($arr["balanceBeam"]<=5.3 && $arr["balanceBeam"]>=3.8){
                    $data["balanceBeam"]=3;
                }
                if($arr["height"]<=123.0 && $arr["height"]>=117.8){
                    $data["height"]=4;
                }
                if($arr["reentry_run"]<=6.2 && $arr["reentry_run"]>=5.8){
                    $data["reentry_run"]=4;
                }
                if($arr["standing_long_jump"]<=127 && $arr["standing_long_jump"]>=111){
                    $data["standing_long_jump"]=4;
                }
                if($arr["tennis_throw"]<=12.0 && $arr["tennis_throw"]>=9.5){
                    $data["tennis_throw"]=4;
                }
                if($arr["continuousJump"]<=5.1 && $arr["continuousJump"]>=4.4){
                    $data["continuousJump"]=4;
                }
                if($arr["flexion"]<=14.4 && $arr["flexion"]>=10.5){
                    $data["flexion"]=4;
                }
                if($arr["balanceBeam"]<=3.7 && $arr["balanceBeam"]>=2.7){
                    $data["balanceBeam"]=4;
                }
                if($arr["height"]>123){
                    $data["height"]=5;
                }
                if($arr["reentry_run"]<5.8 && $arr["reentry_run"]>0){
                    $data["reentry_run"]=5;
                }
                if($arr["standing_long_jump"]>127){
                    $data["standing_long_jump"]=5;
                }
                if($arr["tennis_throw"]>12.0){
                    $data["tennis_throw"]=5;
                }
                if($arr["continuousJump"]<4.4 && $arr["continuousJump"]>0){
                    $data["continuousJump"]=5;
                }
                if($arr["flexion"]>14.4){
                    $data["flexion"]=5;
                }
                if($arr["balanceBeam"]<2.7 && $arr["balanceBeam"]>0){
                    $data["balanceBeam"]=5;
                }
            }else{
                if($arr["height"]<107.0){
                    $data["height"]=1;
                }
                if($arr["reentry_run"]<=10.2 && $arr["reentry_run"]>=8.6){
                    $data["reentry_run"]=1;
                }
                if($arr["standing_long_jump"]<=70 && $arr["standing_long_jump"]>=60){
                    $data["standing_long_jump"]=1;
                }
                if($arr["tennis_throw"]<=3.4  && $arr["tennis_throw"]>=3.0){
                    $data["tennis_throw"]=1;
                }
                if($arr["continuousJump"]<=10.5 && $arr["continuousJump"]>=8.4){
                    $data["continuousJump"]=1;
                }
                if($arr["flexion"]<=5.3 && $arr["flexion"]>=3.0){
                    $data["flexion"]=1;
                }
                if($arr["balanceBeam"]<=17.0 && $arr["balanceBeam>"]=10.8){
                    $data["balanceBeam"]=1;
                }
                if($arr["height"]<=111.9 && $arr["height"]>=107.0){
                    $data["height"]=2;
                }
                if($arr["reentry_run"]<=8.5 && $arr["reentry_run"]>=7.3){
                    $data["reentry_run"]=2;
                }
                if($arr["standing_long_jump"]<=86 && $arr["standing_long_jump"]>=71){
                    $data["standing_long_jump"]=2;
                }
                if($arr["tennis_throw"]<=4.9 && $arr["tennis_throw"]>=3.5){
                    $data["tennis_throw"]=2;
                }
                if($arr["continuousJump"]<=8.3 && $arr["continuousJump"]>=6.3){
                    $data["continuousJump"]=2;
                }
                if($arr["flexion"]<=9.5 && $arr["flexion"]>=5.4){
                    $data["flexion"]=2;
                }
                if($arr["balanceBeam"]<=10.7 && $arr["balanceBeam"]>=6.2){
                    $data["balanceBeam"]=2;
                }
                if($arr["height"]<=116.6 && $arr["height"]>=112.0){
                    $data["height"]=3;
                }
                if($arr["reentry_run"]<=7.2 && $arr["reentry_run"]>=6.6){
                    $data["reentry_run"]=3;
                }
                if($arr["standing_long_jump"]<=100 && $arr["standing_long_jump"]>=87){
                    $data["standing_long_jump"]=3;
                }
                if($arr["tennis_throw"]<=6.4 && $arr["tennis_throw"]>=5.0){
                    $data["tennis_throw"]=3;
                }
                if($arr["continuousJump"]<=6.2 && $arr["continuousJump"]>=5.3){
                    $data["continuousJump"]=3;
                }
                if($arr["flexion"]<=12.9 && $arr["flexion"]>=9.6){
                    $data["flexion"]=3;
                }
                if($arr["balanceBeam"]<=6.1 && $arr["balanceBeam"]>=4.3){
                    $data["balanceBeam"]=3;
                }
                if($arr["height"]<=121.7 && $arr["height"]>=116.7){
                    $data["height"]=4;
                }
                if($arr["reentry_run"]<=6.5 && $arr["reentry_run"]>=6.1){
                    $data["reentry_run"]=4;
                }
                if($arr["standing_long_jump"]<=116 && $arr["standing_long_jump"]>=101){
                    $data["standing_long_jump"]=4;
                }
                if($arr["tennis_throw"]<=8.0 && $arr["tennis_throw"]>=6.5){
                    $data["tennis_throw"]=4;
                }
                if($arr["continuousJump"]<=5.2 && $arr["continuousJump"]>=4.6){
                    $data["continuousJump"]=4;
                }
                if($arr["flexion"]<=16.7 && $arr["flexion"]>=13.0){
                    $data["flexion"]=4;
                }
                if($arr["balanceBeam"]<=4.2 && $arr["balanceBeam"]>=3.0){
                    $data["balanceBeam"]=4;
                }
                if($arr["height"]>121.7){
                    $data["height"]=5;
                }
                if($arr["reentry_run"]<6.1 && $arr["reentry_run"]>0){
                    $data["reentry_run"]=5;
                }
                if($arr["standing_long_jump"]>116){
                    $data["standing_long_jump"]=5;
                }
                if($arr["tennis_throw"]>8.0){
                    $data["tennis_throw"]=5;
                }
                if($arr["continuousJump"]<4.6 && $arr["continuousJump"]>0){
                    $data["continuousJump"]=5;
                }
                if($arr["flexion"]>16.7){
                    $data["flexion"]=5;
                }
                if($arr["balanceBeam"]<3.0 && $arr["balanceBeam"]>0){
                    $data["balanceBeam"]=5;
                }
            }
        }
        return $data;
    }
    //通过性别、身高和体重来判断得分
    private function _getHeightWeightResult($gender,$height,$weight){
        $score=1;
        $is_obesity=1;
        if($gender==1){
            if($height>=76.0 && $height<=76.9){
                if($weight>=8.6 && $weight<=9.3){
                   $score=3; 
                   $is_obesity=2;
                }
                if($weight>=9.4 && $weight<=11.7){
                    $score=5; 
                    $is_obesity=3;
                }
                if($weight>=11.8 && $weight<=12.4){
                   $score=3; 
                   $is_obesity=4;
                }
                if($weight>12.4){
                   $is_obesity=5; 
                }
            }
            if($height>=77.0 && $height<=77.9){
                if($weight>=8.7 && $weight<=9.5){
                    $score=3; 
                    $is_obesity=2;
                }
                if($weight>=9.6 && $weight<=11.8){
                   $score=5; 
                   $is_obesity=3;
                }
                if($weight>=11.9 && $weight<=12.5){
                   $score=3; 
                   $is_obesity=4;
                }
                if($weight>12.5){
                   $is_obesity=5; 
                }
            }
            if($height>=78.0 && $height<=78.9){
                if($weight>=8.9 && $weight<=9.7){
                   $score=3; 
                    $is_obesity=2;
                }
                if($weight>=9.8 && $weight<=11.9){
                   $score=5; 
                   $is_obesity=3;
                }
                if($weight>=12.0 && $weight<=12.6){
                   $score=3; 
                   $is_obesity=4;
                }
                if($weight>12.6){
                   $is_obesity=5; 
                }
            }
            if($height>=79.0 && $height<=79.9){
                if($weight>=9.1 && $weight<=9.8){
                   $score=3; 
                    $is_obesity=2;
                }
                if($weight>=9.9 && $weight<=12.1){
                   $score=5; 
                   $is_obesity=3;
                }
                if($weight>=12.2 && $weight<=12.8){
                   $score=3; 
                   $is_obesity=4;
                }
                if($weight>12.8){
                   $is_obesity=5; 
                }
            }
            if($height>=80.0 && $height<=80.9){
                if($weight>=9.2 && $weight<=10.0){
                   $score=3; 
                    $is_obesity=2;
                }
                if($weight>=10.1 && $weight<=12.3){
                   $score=5; 
                   $is_obesity=3;
                }
                if($weight>=12.4 && $weight<=12.9){
                   $score=3; 
                   $is_obesity=4;
                }
                if($weight>12.9){
                   $is_obesity=5; 
                }
            }
            if($height>=81.0 && $height<=81.9){
                if($weight>=9.4 && $weight<=10.1){
                   $score=3; 
                    $is_obesity=2;
                }
                if($weight>=10.2 && $weight<=12.5){
                   $score=5; 
                   $is_obesity=3;
                }
                if($weight>=12.6 && $weight<=13.1){
                   $score=3; 
                   $is_obesity=4;
                }
                if($weight>13.1){
                   $is_obesity=5;  
                }
            }
            if($height>=82.0 && $height<=82.9){
                if($weight>=9.6 && $weight<=10.2){
                   $score=3; 
                    $is_obesity=2;
                }
                if($weight>=10.3 && $weight<=12.7){
                   $score=5; 
                    $is_obesity=3;
                }
                if($weight>=12.8 && $weight<=13.3){
                   $score=3; 
                   $is_obesity=4;
                }
                if($weight>13.3){
                   $is_obesity=5;  
                }
            }
            if($height>=83.0 && $height<=83.9){
                if($weight>=9.8 && $weight<=10.4){
                   $score=3; 
                    $is_obesity=2;
                }
                if($weight>=10.5 && $weight<=12.9){
                   $score=5; 
                    $is_obesity=3;
                }
                if($weight>=13.0 && $weight<=13.5){
                   $score=3; 
                   $is_obesity=4;
                }
                if($weight>13.5){
                   $is_obesity=5; 
                }
            }
            if($height>=84.0 && $height<=84.9){
                if($weight>=10.0 && $weight<=10.5){
                   $score=3; 
                    $is_obesity=2;
                }
                if($weight>=10.6 && $weight<=13.1){
                   $score=5; 
                    $is_obesity=3;
                }
                if($weight>=13.2 && $weight<=13.8){
                   $score=3; 
                   $is_obesity=4;
                }
                if($weight>13.8){
                   $is_obesity=5;  
                }
            }
            if($height>=85.0 && $height<=85.9){
                if($weight>=10.1 && $weight<=10.7){
                   $score=3; 
                    $is_obesity=2;
                }
                if($weight>=10.8 && $weight<=13.3){
                   $score=5; 
                    $is_obesity=3;
                }
                if($weight>=13.4 && $weight<=14.0){
                   $score=3; 
                   $is_obesity=4;
                }
                if($weight>14.0){
                   $is_obesity=5; 
                }
            }
            if($height>=86.0 && $height<=86.9){
                if($weight>=10.3 && $weight<=10.9){
                   $score=3; 
                    $is_obesity=2;
                }
                if($weight>=11.0 && $weight<=13.6){
                   $score=5; 
                    $is_obesity=3;
                }
                if($weight>=13.7 && $weight<=14.2){
                   $score=3; 
                   $is_obesity=4;
                }
                if($weight>14.2){
                   $is_obesity=5;
                }
            }
            if($height>=87.0 && $height<=87.9){
                if($weight>=10.5 && $weight<=11.1){
                   $score=3; 
                    $is_obesity=2;
                }
                if($weight>=11.2 && $weight<=13.8){
                   $score=5; 
                    $is_obesity=3;
                }
                if($weight>=13.9 && $weight<=14.5){
                   $score=3; 
                   $is_obesity=4;
                }
                if($weight>14.5){
                   $is_obesity=5;
                }
            }
            if($height>=88.0 && $height<=88.9){
                if($weight>=10.7 && $weight<=11.3){
                   $score=3; 
                    $is_obesity=2;
                }
                if($weight>=11.4 && $weight<=14.0){
                   $score=5; 
                    $is_obesity=3;
                }
                if($weight>=14.1 && $weight<=14.7){
                   $score=3; 
                   $is_obesity=4;
                }
                if($weight>14.7){
                   $is_obesity=5; 
                }
            }
            if($height>=89.0 && $height<=89.9){
                if($weight>=10.9 && $weight<=11.5){
                   $score=3; 
                    $is_obesity=2;
                }
                if($weight>=11.6 && $weight<=14.3){
                   $score=5; 
                    $is_obesity=3;
                }
                if($weight>=14.4 && $weight<=14.9){
                   $score=3; 
                   $is_obesity=4;
                }
                if($weight>14.9){
                   $is_obesity=5; 
                }
            }
            if($height>=90.0 && $height<=90.9){
                if($weight>=11.1 && $weight<=11.7){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=11.8 && $weight<=14.5){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=14.6 && $weight<=15.2){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>15.2){
                   $is_obesity=5; 
                }
            }
            if($height>=91.0 && $height<=91.9){
                if($weight>=11.3 && $weight<=11.9){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=12.0 && $weight<=14.7){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=14.8 && $weight<=15.4){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>15.4){
                   $is_obesity=5; 
                }
            }
            if($height>=92.0 && $height<=92.9){
                if($weight>=11.3 && $weight<=12.1){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=12.2 && $weight<=15.0){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=15.1 && $weight<=15.6){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>15.6){
                   $is_obesity=5; 
                }
            }
            if($height>=93.0 && $height<=93.9){
                if($weight>=11.7 && $weight<=12.3){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=12.4 && $weight<=15.2){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=15.3 && $weight<=15.9){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>15.9){
                   $is_obesity=5; 
                }
            }
            if($height>=94.0 && $height<=94.9){
                if($weight>=11.9 && $weight<=12.5){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=12.6 && $weight<=15.4){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=15.5 && $weight<=16.1){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>16.1){
                   $is_obesity=5; 
                }
            }
            if($height>=95.0 && $height<=95.9){
                if($weight>=12.1 && $weight<=12.7){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=12.8 && $weight<=15.7){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=15.8 && $weight<=16.4){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>16.4){
                   $is_obesity=5; 
                }
            }
            if($height>=96.0 && $height<=96.9){
                if($weight>=12.4 && $weight<=12.9){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=13.0 && $weight<=16.0){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=16.1 && $weight<=16.6){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>16.6){
                   $is_obesity=5; 
                }
            }
            if($height>=97.0 && $height<=97.9){
                if($weight>=12.6 && $weight<=13.2){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=13.3 && $weight<=16.2){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=16.3 && $weight<=16.9){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>16.9){
                   $is_obesity=5; 
                }
            }
            if($height>=98.0 && $height<=98.9){
                if($weight>=12.8 && $weight<=13.5){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=13.6 && $weight<=16.5){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=16.6 && $weight<=17.2){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>17.2){
                   $is_obesity=5; 
                }
            }
            if($height>=99.0 && $height<=99.9){
                if($weight>=13.0 && $weight<=13.7){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=13.8 && $weight<=16.8){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=16.9 && $weight<=17.5){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>17.5){
                   $is_obesity=5; 
                }
            }
            if($height>=100.0 && $height<=100.9){
                if($weight>=13.3 && $weight<=14.0){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=14.1 && $weight<=17.0){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=17.1 && $weight<=17.7){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>17.7){
                   $is_obesity=5; 
                }
            }
            if($height>=101.0 && $height<=101.9){
                if($weight>=13.5 && $weight<=14.3){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=14.4 && $weight<=17.3){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=17.4 && $weight<=18.0){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>18.0){
                   $is_obesity=5; 
                }
            }
            if($height>=102.0 && $height<=102.9){
                if($weight>=13.7 && $weight<=14.6){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=14.7 && $weight<=17.6){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=17.7 && $weight<=18.3){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>18.3){
                   $is_obesity=1; 
                }
            }
            if($height>=103.0 && $height<=103.9){
                if($weight>=13.9 && $weight<=14.9){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=15.0 && $weight<=17.9){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=18.0 && $weight<=18.6){
                   $is_obesity=4; 
                   $score=3; 
                }
                if($weight>18.6){
                   $is_obesity=5; 
                }
            }
            if($height>=104.0 && $height<=104.9){
                if($weight>=14.1 && $weight<=15.2){
                   $is_obesity=2; 
                   $score=3; 
                }
                if($weight>=15.3 && $weight<=18.2){
                   $is_obesity=3; 
                   $score=5; 
                }
                if($weight>=18.3 && $weight<=18.9){
                   $is_obesity=4; 
                   $score=3; 
                }
                if($weight>18.9){
                   $is_obesity=5; 
                }
            }
            if($height>=105.0 && $height<=105.9){
                if($weight>=14.4 && $weight<=15.6){
                   $is_obesity=2; 
                   $score=3; 
                }
                if($weight>=15.7 && $weight<=18.5){
                   $is_obesity=3; 
                   $score=5; 
                }
                if($weight>=18.6 && $weight<=19.3){
                   $is_obesity=4; 
                   $score=3; 
                }
                if($weight>19.3){
                   $is_obesity=5; 
                }
            }
            if($height>=106.0 && $height<=106.9){
                if($weight>=14.6 && $weight<=15.8){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=15.9 && $weight<=18.8){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=18.9 && $weight<=19.6){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>19.6){
                   $is_obesity=5; 
                }
            }
            if($height>=107.0 && $height<=107.9){
                if($weight>=14.8 && $weight<=16.0){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=16.1 && $weight<=19.1){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=19.2 && $weight<=19.9){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>19.9){
                   $is_obesity=5; 
                }
            }
            if($height>=108.0 && $height<=108.9){
                if($weight>=15.0 && $weight<=16.2){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=16.3 && $weight<=19.4){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=19.5 && $weight<=20.3){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>20.3){
                   $is_obesity=5; 
                }
            }
            if($height>=109.0 && $height<=109.9){
                if($weight>=15.3 && $weight<=16.5){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=16.6 && $weight<=19.9){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=20.0 && $weight<=20.7){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>20.7){
                   $is_obesity=5; 
                }
            }
            if($height>=110.0 && $height<=110.9){
                if($weight>=15.6 && $weight<=16.8){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=16.9 && $weight<=20.2){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=20.3 && $weight<=21.0){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>21.0){
                   $is_obesity=5; 
                }
            }
            if($height>=111.0 && $height<=111.9){
                if($weight>=15.9 && $weight<=17.1){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=17.2 && $weight<=20.5){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=22.6 && $weight<=21.4){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>21.4){
                   $is_obesity=5; 
                }
            }
            if($height>=112.0 && $height<=112.9){
                if($weight>=16.2 && $weight<=17.4){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=17.5 && $weight<=20.9){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=21.0 && $weight<=21.9){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>21.9){
                   $is_obesity=5; 
                }
            }
            if($height>=113.0 && $height<=113.9){
                if($weight>=16.5 && $weight<=17.7){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=17.8 && $weight<=21.3){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=21.4 && $weight<=22.2){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>22.2){
                   $is_obesity=5; 
                }
            }
            if($height>=114.0 && $height<=114.9){
                if($weight>=16.8 && $weight<=17.9){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=18.0 && $weight<=21.8){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=21.9 && $weight<=22.6){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>22.6){
                   $is_obesity=5; 
                }
            }
            if($height>=115.0 && $height<=115.9){
                if($weight>=17.1 && $weight<=18.1){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=18.2 && $weight<=22.1){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=22.2 && $weight<=23.1){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>23.1){
                   $is_obesity=5; 
                }
            }
            if($height>=116.0 && $height<=116.9){
                if($weight>=17.4 && $weight<=18.3){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=18.4 && $weight<=22.5){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=22.6 && $weight<=23.5){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>23.5){
                   $is_obesity=5; 
                }
            }
            if($height>=117.0 && $height<=117.9){
                if($weight>=17.8 && $weight<=18.5){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=18.6 && $weight<=22.9){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=23.0 && $weight<=24.0){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>24.0){
                   $is_obesity=5; 
                }
            }
            if($height>=118.0 && $height<=118.9){
                if($weight>=18.1 && $weight<=18.7){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=18.8 && $weight<=23.4){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=23.5 && $weight<=24.5){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>24.5){
                   $is_obesity=5; 
                }
            }
            if($height>=119.0 && $height<=119.9){
                if($weight>=18.5 && $weight<=18.9){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=19.0 && $weight<=23.8){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=23.9 && $weight<=25.0){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>25.0){
                   $is_obesity=5; 
                }
            }
            if($height>=120.0 && $height<=120.9){
                if($weight>=18.9 && $weight<=19.2){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=19.3 && $weight<=24.3){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=24.4 && $weight<=25.5){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>25.5){
                   $is_obesity=5; 
                }
            }
            if($height>=121.0 && $height<=121.9){
                if($weight>=19.3 && $weight<=19.5){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=19.6 && $weight<=24.7){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=24.8 && $weight<=26.0){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>26.0){
                   $is_obesity=5; 
                }
            }
            if($height>=122.0 && $height<=122.9){
                if($weight>=19.6 && $weight<=20.0){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=20.1 && $weight<=25.3){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=25.4 && $weight<=26.5){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>26.5){
                   $is_obesity=5; 
                }
            }
            if($height>=123.0 && $height<=123.9){
                if($weight>=20.0 && $weight<=20.4){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=20.5 && $weight<=25.8){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=25.9 && $weight<=27.1){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>27.1){
                   $is_obesity=5; 
                }
            }
            if($height>=124.0 && $height<=123.9){
                if($weight>=20.4 && $weight<=20.8){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=20.9 && $weight<=26.3){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=26.4 && $weight<=27.7){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>27.7){
                   $is_obesity=5; 
                }
            }
            if($height>=125.0 && $height<=125.9){
                if($weight>=20.8 && $weight<=21.3){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=21.4 && $weight<=26.9){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=27.0 && $weight<=28.3){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>28.3){
                   $is_obesity=5; 
                }
            }
            if($height>=126.0 && $height<=126.9){
                if($weight>=21.2 && $weight<=21.7){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=21.8 && $weight<=27.4){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=27.5 && $weight<=28.9){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>28.9){
                   $is_obesity=5; 
                }
            }
            if($height>=127.0 && $height<=127.9){
                if($weight>=21.6 && $weight<=22.2){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=22.3 && $weight<=28.0){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=28.1 && $weight<=29.5){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>29.5){
                   $is_obesity=5; 
                }
            } 
            if($height>=128.0 && $height<=128.9){
                if($weight>=22.0 && $weight<=22.6){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=22.7 && $weight<=28.6){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=28.7 && $weight<=30.2){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>30.2){
                   $is_obesity=5; 
                }
            } 
            if($height>=129.0 && $height<=129.9){
                if($weight>=22.5 && $weight<=23.1){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=23.2 && $weight<=29.2){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=29.3 && $weight<=30.9){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>30.9){
                   $is_obesity=5; 
                }
            } 
            if($height>=130.0 && $height<=130.9){
                if($weight>=22.9 && $weight<=23.6){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=23.7 && $weight<=29.8){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=29.9 && $weight<=31.6){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>31.6){
                   $is_obesity=5; 
                }
            } 
            if($height>=131.0 && $height<=131.9){
                if($weight>=23.4 && $weight<=24.1){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=24.2 && $weight<=30.5){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=30.6 && $weight<=32.3){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>32.3){
                   $is_obesity=5; 
                }
            } 
            if($height>=132.0 && $height<=132.9){
                if($weight>=23.8 && $weight<=24.6){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=24.7 && $weight<=31.2){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=31.3 && $weight<=33.1){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>33.1){
                   $is_obesity=5; 
                }
            } 
            if($height>=133.0 && $height<=133.9){
                if($weight>=24.3 && $weight<=25.1){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=25.2 && $weight<=31.9){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=32.0 && $weight<=33.8){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>33.8){
                   $is_obesity=5; 
                }
            } 
            if($height>=134.0 && $height<=134.9){
                if($weight>=24.8 && $weight<=25.7){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=25.8 && $weight<=32.7){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=32.8 && $weight<=34.6){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>34.6){
                   $is_obesity=5; 
                }
            } 
            if($height>=135.0 && $height<=135.9){
                if($weight>=25.3 && $weight<=26.2){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=26.3 && $weight<=33.4){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=33.5 && $weight<=35.5){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>35.5){
                   $is_obesity=5; 
                }
            }
            if($height>=136.0 && $height<=136.9){
                if($weight>=25.8 && $weight<=26.8){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=26.9 && $weight<=34.2){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=34.3 && $weight<=36.3){
                   $score=3;
                   $is_obesity=4;  
                }
                if($weight>36.3){
                   $is_obesity=5; 
                }
            }  
            if($height>=137.0 && $height<=137.9){
                if($weight>=26.3 && $weight<=27.4){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=27.5 && $weight<=35.0){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=35.1 && $weight<=36.9){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>36.9){
                   $is_obesity=5; 
                }
            }
            if($height>=138.0 && $height<=138.9){
                if($weight>=26.8 && $weight<=28.0){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=28.1 && $weight<=35.8){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=35.9 && $weight<=37.5){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>37.5){
                   $is_obesity=5; 
                }
            }
            if($height>=139.0 && $height<=139.9){
                if($weight>=27.4 && $weight<=28.6){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=28.7 && $weight<=36.6){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=36.7 && $weight<=38.2){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>38.2){
                   $is_obesity=5; 
                }
            } 
            if($height>=140.0 && $height<=140.9){
                if($weight>=27.9 && $weight<=29.2){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=29.3 && $weight<=37.5){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=37.6 && $weight<=38.9){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>38.9){
                   $is_obesity=5; 
                }
            }  
            if($height>=141.0 && $height<=141.9){
                if($weight>=28.4 && $weight<=29.9){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=30.0 && $weight<=38.5){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=38.6 && $weight<=39.7){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>39.7){
                   $is_obesity=5; 
                }
            }
            if($height>=142.0 && $height<=142.9){
                if($weight>=29.0 && $weight<=30.6){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=30.7 && $weight<=39.6){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=39.7 && $weight<=40.6){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>40.6){
                   $is_obesity=5; 
                }
            } 
            if($height>=143.0 && $height<=143.9){
                if($weight>=29.7 && $weight<=31.3){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=31.4 && $weight<=40.6){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=40.7 && $weight<=41.6){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>41.6){
                   $is_obesity=5; 
                }
            }
            if($height>=144.0 && $height<=144.9){
                if($weight>=30.4 && $weight<=31.9){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=32.0 && $weight<=41.7){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=41.8 && $weight<=42.6){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>42.6){
                   $is_obesity=5; 
                }
            } 
            if($height>=145.0 && $height<=145.9){
                if($weight>=31.0 && $weight<=32.5){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=32.6 && $weight<=42.7){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=42.8 && $weight<=43.7){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>43.7){
                   $is_obesity=5; 
                }
            }  
        }else{
            if($height>=76.0 && $height<=76.9){
                if($weight>=8.9 && $weight<=9.0){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=9.1 && $weight<=11.6){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=11.7 && $weight<=12.9){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>12.9){
                   $is_obesity=5; 
                }
            }
            if($height>=77.0 && $height<=77.9){
                if($weight>=9.0 && $weight<=9.1){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=9.2 && $weight<=11.8){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=11.9 && $weight<=13.1){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>13.1){
                   $is_obesity=5; 
                }
            }
            if($height>=78.0 && $height<=78.9){
                if($weight>=9.1 && $weight<=9.3){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=9.4 && $weight<=12.0){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=12.1 && $weight<=13.2){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>13.2){
                   $is_obesity=5; 
                }
            }
            if($height>=79.0 && $height<=79.9){
                if($weight>=9.3 && $weight<=9.5){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=9.6 && $weight<=12.2){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=12.3 && $weight<=13.3){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>13.3){
                   $is_obesity=5; 
                }
            }
            if($height>=80.0 && $height<=80.9){
                if($weight>=9.5 && $weight<=9.7){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=9.8 && $weight<=12.4){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=12.5 && $weight<=13.5){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>13.5){
                   $is_obesity=5; 
                }
            }
            if($height>=81.0 && $height<=81.9){
                if($weight>=9.7 && $weight<=10.0){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=10.1 && $weight<=12.6){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=12.7 && $weight<=13.7){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>13.7){
                   $is_obesity=5; 
                }
            }
            if($height>=82.0 && $height<=82.9){
                if($weight>=9.9 && $weight<=10.2){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=10.3 && $weight<=12.8){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=12.9 && $weight<=13.9){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>13.9){
                   $is_obesity=5; 
                }
            }
            if($height>=83.0 && $height<=83.9){
                if($weight>=10.1 && $weight<=10.4){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=10.5 && $weight<=13.1){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=13.2 && $weight<=14.1){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>14.1){
                   $is_obesity=5; 
                }
            }
            if($height>=84.0 && $height<=84.9){
                if($weight>=10.3 && $weight<=10.6){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=10.7 && $weight<=13.3){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=13.4 && $weight<=14.4){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>14.4){
                   $is_obesity=5; 
                }
            }
            if($height>=85.0 && $height<=85.9){
                if($weight>=10.5 && $weight<=10.8){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=10.9 && $weight<=13.5){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=13.6 && $weight<=14.6){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>14.8){
                   $is_obesity=5; 
                }
            }
            if($height>=86.0 && $height<=86.9){
                if($weight>=10.7 && $weight<=11.0){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=11.1 && $weight<=13.7){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=13.8 && $weight<=14.8){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>14.8){
                   $is_obesity=5; 
                }
            }
            if($height>=87.0 && $height<=87.9){
                if($weight>=10.9 && $weight<=11.2){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=11.3 && $weight<=14.0){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=14.1 && $weight<=15.1){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>15.1){
                   $is_obesity=5; 
                }
            }
            if($height>=88.0 && $height<=88.9){
                if($weight>=11.1 && $weight<=11.4){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=11.5 && $weight<=14.2){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=14.3 && $weight<=15.3){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>15.3){
                   $is_obesity=5; 
                }
            }
            if($height>=89.0 && $height<=89.9){
                if($weight>=11.3 && $weight<=11.6){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=11.7 && $weight<=14.4){
                   $score=5;
                   $is_obesity=3;  
                }
                if($weight>=14.5 && $weight<=15.6){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>15.6){
                   $is_obesity=5; 
                }
            }
            if($height>=90.0 && $height<=90.9){
                if($weight>=11.5 && $weight<=11.8){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=11.9 && $weight<=14.7){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=14.8 && $weight<=15.8){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>15.8){
                   $is_obesity=5; 
                }
            }
            if($height>=91.0 && $height<=91.9){
                if($weight>=11.7 && $weight<=12.1){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=12.2 && $weight<=14.9){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=15.0 && $weight<=16.1){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>16.1){
                   $is_obesity=5; 
                }
            }
            if($height>=92.0 && $height<=92.9){
                if($weight>=11.9 && $weight<=12.3){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=12.4 && $weight<=15.2){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=15.3 && $weight<=16.3){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>16.3){
                   $is_obesity=5; 
                }
            }
            if($height>=93.0 && $height<=93.9){
                if($weight>=12.1 && $weight<=12.5){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=12.6 && $weight<=15.4){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=15.5 && $weight<=16.6){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>16.6){
                   $is_obesity=5; 
                }
            }
            if($height>=94.0 && $height<=94.9){
                if($weight>=12.3 && $weight<=12.7){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=12.8 && $weight<=15.7){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=15.8 && $weight<=16.8){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>16.8){
                   $is_obesity=5; 
                }
            }
            if($height>=95.0 && $height<=95.9){
                if($weight>=12.5 && $weight<=13.0){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=13.1 && $weight<=15.9){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=16.0 && $weight<=17.1){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>17.1){
                   $is_obesity=5; 
                }
            }
            if($height>=96.0 && $height<=96.9){
                if($weight>=12.7 && $weight<=13.2){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=13.3 && $weight<=16.2){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=16.3 && $weight<=17.4){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>17.4){
                   $is_obesity=5; 
                }
            }
            if($height>=97.0 && $height<=97.9){
                if($weight>=13.0 && $weight<=13.4){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=13.5 && $weight<=16.5){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=16.6 && $weight<=17.7){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>17.7){
                   $is_obesity=5; 
                }
            }
            if($height>=98.0 && $height<=98.9){
                if($weight>=13.2 && $weight<=13.7){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=13.8 && $weight<=16.7){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=16.8 && $weight<=18.0){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>18.0){
                   $is_obesity=5; 
                }
            }
            if($height>=99.0 && $height<=99.9){
                if($weight>=13.4 && $weight<=13.9){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=14.0 && $weight<=17.0){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=17.1 && $weight<=18.2){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>18.2){
                   $is_obesity=5; 
                }
            }
            if($height>=100.0 && $height<=100.9){
                if($weight>=13.6 && $weight<=14.2){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=14.3 && $weight<=17.3){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=17.4 && $weight<=18.5){
                   $score=3;
                   $is_obesity=4;  
                }
                if($weight>18.5){
                   $is_obesity=5; 
                }
            }
            if($height>=101.0 && $height<=101.9){
                if($weight>=13.9 && $weight<=14.6){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=14.7 && $weight<=17.6){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=17.7 && $weight<=18.8){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>18.8){
                   $is_obesity=5; 
                }
            }
            if($height>=102.0 && $height<=102.9){
                if($weight>=14.1 && $weight<=14.7){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=14.8 && $weight<=17.9){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=18.0 && $weight<=19.1){
                   $score=3;
                   $is_obesity=4;  
                }
                if($weight>19.1){
                   $is_obesity=5; 
                }   
            }
            if($height>=103.0 && $height<=103.9){
                if($weight>=14.3 && $weight<=14.9){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=15.0 && $weight<=18.2){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=18.3 && $weight<=19.5){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>19.5){
                   $is_obesity=5; 
                }
            }
            if($height>=104.0 && $height<=104.9){
                if($weight>=14.6 && $weight<=15.2){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=15.3 && $weight<=18.5){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=18.6 && $weight<=19.8){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>19.8){
                   $is_obesity=5; 
                }
            }
            if($height>=105.0 && $height<=105.9){
                if($weight>=14.8 && $weight<=15.5){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=15.6 && $weight<=18.8){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=18.9 && $weight<=20.1){
                   $score=3; 
                   $is_obesity=4; 
                }
                 if($weight>20.1){
                   $is_obesity=5; 
                }
            }
            if($height>=106.0 && $height<=106.9){
                if($weight>=15.1 && $weight<=15.7){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=15.8 && $weight<=19.1){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=19.2 && $weight<=20.4){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>20.4){
                   $is_obesity=5; 
                }
            }
            if($height>=107.0 && $height<=107.9){
                if($weight>=15.4 && $weight<=16.0){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=16.1 && $weight<=19.4){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=19.5 && $weight<=20.8){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>20.8){
                   $is_obesity=5; 
                }
            }
            if($height>=108.0 && $height<=108.9){
                if($weight>=15.6 && $weight<=16.3){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=16.4 && $weight<=19.8){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=19.9 && $weight<=21.1){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>21.1){
                   $is_obesity=5; 
                }
            }
            if($height>=109.0 && $height<=109.9){
                if($weight>=15.9 && $weight<=16.6){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=16.7 && $weight<=20.1){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=20.2 && $weight<=21.5){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>21.5){
                   $is_obesity=5; 
                }
            }
            if($height>=110.0 && $height<=110.9){
                if($weight>=16.2 && $weight<=16.9){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=17.0 && $weight<=20.5){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=20.6 && $weight<=21.8){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>21.8){
                   $is_obesity=5; 
                }
            }
            if($height>=111.0 && $height<=111.9){
                if($weight>=16.5 && $weight<=17.2){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=17.3 && $weight<=20.8){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=20.9 && $weight<=22.2){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>22.2){
                   $is_obesity=5; 
                }
            }
            if($height>=112.0 && $height<=112.9){
                if($weight>=16.8 && $weight<=17.5){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=17.6 && $weight<=21.2){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=21.3 && $weight<=22.6){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>22.6){
                   $is_obesity=5; 
                }
            }
            if($height>=113.0 && $height<=113.9){
                if($weight>=17.1 && $weight<=17.8){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=17.9 && $weight<=21.6){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=21.7 && $weight<=23.0){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>23.0){
                   $is_obesity=5; 
                }
            }
            if($height>=114.0 && $height<=114.9){
                if($weight>=17.4 && $weight<=18.2){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=18.3 && $weight<=21.9){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=22.0 && $weight<=23.4){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>23.4){
                   $is_obesity=5; 
                }
            }
            if($height>=115.0 && $height<=115.9){
                if($weight>=17.7 && $weight<=18.5){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=18.6 && $weight<=22.2){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=22.3 && $weight<=23.8){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>23.8){
                   $is_obesity=5; 
                }
            }
            if($height>=116.0 && $height<=116.9){
                if($weight>=18.0 && $weight<=18.8){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=18.9 && $weight<=22.8){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=22.9 && $weight<=24.3){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>24.3){
                   $is_obesity=5; 
                }
            }
            if($height>=117.0 && $height<=117.9){
                if($weight>=18.4 && $weight<=19.2){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=19.3 && $weight<=23.2){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=23.3 && $weight<=24.8){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>24.8){
                   $is_obesity=5; 
                }
            }
            if($height>=118.0 && $height<=118.9){
                if($weight>=18.7 && $weight<=19.6){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=19.7 && $weight<=23.7){
                   $score=5;
                   $is_obesity=3;  
                }
                if($weight>=23.8 && $weight<=25.2){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>25.2){
                   $is_obesity=5; 
                }
            }
            if($height>=119.0 && $height<=119.9){
                if($weight>=19.1 && $weight<=20.2){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=20.3 && $weight<=24.1){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=24.2 && $weight<=25.8){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>25.8){
                   $is_obesity=5; 
                }
            }
            if($height>=120.0 && $height<=120.9){
                if($weight>=19.4 && $weight<=20.5){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=20.6 && $weight<=24.6){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=24.7 && $weight<=26.3){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>26.3){
                   $is_obesity=5; 
                }
            }
            if($height>=121.0 && $height<=121.9){
                if($weight>=19.8 && $weight<=20.8){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=20.9 && $weight<=25.0){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=25.1 && $weight<=26.9){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>26.9){
                   $is_obesity=5; 
                }
            }
            if($height>=122.0 && $height<=122.9){
                if($weight>=20.2 && $weight<=21.2){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=21.3 && $weight<=25.4){
                   $score=5;
                   $is_obesity=3;  
                }
                if($weight>=25.5 && $weight<=27.5){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>27.5){
                   $is_obesity=5; 
                }
            }
            if($height>=123.0 && $height<=123.9){
                if($weight>=20.6 && $weight<=21.6){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=21.7 && $weight<=25.8){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=25.9 && $weight<=28.1){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>28.1){
                   $is_obesity=5; 
                }
            }
            if($height>=124.0 && $height<=124.9){
                if($weight>=21.0 && $weight<=22.0){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=22.1 && $weight<=26.2){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=26.3 && $weight<=28.7){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>28.7){
                   $is_obesity=5; 
                }
            }
            if($height>=125.0 && $height<=125.9){
                if($weight>=21.4 && $weight<=22.5){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=22.6 && $weight<=26.5){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=26.6 && $weight<=29.4){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>29.4){
                   $is_obesity=5; 
                }
            }
            if($height>=126.0 && $height<=126.9){
                if($weight>=21.8 && $weight<=23.0){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=23.1 && $weight<=26.9){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=27.0 && $weight<=30.2){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>30.2){
                   $is_obesity=5; 
                }
            }
            if($height>=127.0 && $height<=127.9){
                if($weight>=22.2 && $weight<=23.4){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=23.5 && $weight<=27.3){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=27.4 && $weight<=30.9){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>30.9){
                   $is_obesity=5; 
                }
            } 
            if($height>=128.0 && $height<=128.9){
                if($weight>=22.7 && $weight<=24.0){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=24.1 && $weight<=27.8){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=27.9 && $weight<=31.7){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>31.7){
                   $is_obesity=5; 
                }
            } 
            if($height>=129.0 && $height<=129.9){
                if($weight>=23.1 && $weight<=24.5){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=24.6 && $weight<=28.3){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=28.4 && $weight<=32.6){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>32.6){
                   $is_obesity=5; 
                }
            } 
            if($height>=130.0 && $height<=130.9){
                if($weight>=23.6 && $weight<=25.0){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=25.1 && $weight<=28.8){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=28.9 && $weight<=33.4){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>33.4){
                   $is_obesity=5; 
                }
            } 
            if($height>=131.0 && $height<=131.9){
                if($weight>=24.1 && $weight<=25.6){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=25.7 && $weight<=29.3){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=29.4 && $weight<=34.4){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>34.4){
                   $is_obesity=5; 
                }
            } 
            if($height>=132.0 && $height<=132.9){
                if($weight>=24.6 && $weight<=26.1){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=26.2 && $weight<=29.7){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=29.8 && $weight<=35.3){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>35.3){
                   $is_obesity=5; 
                }
            } 
            if($height>=133.0 && $height<=133.9){
                if($weight>=25.1 && $weight<=26.7){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=26.8 && $weight<=30.2){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=30.3 && $weight<=36.3){
                   $score=3;
                   $is_obesity=4;  
                }
                if($weight>36.3){
                   $is_obesity=5; 
                }
            } 
            if($height>=134.0 && $height<=134.9){
                if($weight>=25.7 && $weight<=27.3){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=27.4 && $weight<=30.7){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=30.8 && $weight<=37.4){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>37.4){
                   $is_obesity=5; 
                }
            } 
            if($height>=135.0 && $height<=135.9){
                if($weight<26.2 || $weight>28.0){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=28.1 && $weight<=31.2){
                   $score=3; 
                   $is_obesity=3; 
                }
                if($weight>=31.3 && $weight<=38.5){
                   $score=5; 
                   $is_obesity=4; 
                }
                if($weight>38.5){
                   $is_obesity=5; 
                }
            }
            if($height>=136.0 && $height<=136.9){
                if($weight>=26.7 && $weight<=28.6){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=28.7 && $weight<=31.7){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=31.8 && $weight<=39.7){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>39.7){
                   $is_obesity=5; 
                }
            }  
            if($height>=137.0 && $height<=137.9){
                if($weight>=27.4  && $weight<=29.4){
                   $score=3; 
                   $is_obesity=2; 
                }
                if($weight>=29.5 && $weight<=32.3){
                   $score=5; 
                   $is_obesity=3; 
                }
                if($weight>=32.4 && $weight<=40.6){
                   $score=3; 
                   $is_obesity=4; 
                }
                if($weight>40.6){
                   $is_obesity=5; 
                }
            }
        }
        $data["height_weight"]=$score;
        $data["is_obesity"]=$is_obesity;
        return $data;
    }
}